function name(code) {
  if (
    code === codes.dash ||
    code === codes.dot ||
    code === codes.colon ||
    code === codes.underscore ||
    asciiAlphanumeric(code)
  ) {
    return true
  }

  return false
}
<https://github.com/micromark/micromark-extension-directive/blob/3be1f50/dev/lib/factory-attributes.js#L168>

@param {number} code
@returns {boolean}