JSPM

estree-util-is-identifier-name

1.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6510562
  • Score
    100M100P100Q248621F
  • License MIT

Check if something can be an ecmascript (javascript) identifier name

Package Exports

  • estree-util-is-identifier-name

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (estree-util-is-identifier-name) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

estree-util-is-identifier-name

Build Coverage Downloads Size

Check if something can be an identifier name.

Install

npm:

npm install estree-util-is-identifier-name

Use

var isIdentifierName = require('estree-util-is-identifier-name')

isIdentifierName.name('$something69') // => true
isIdentifierName.name('69') // => false
isIdentifierName.name('var') // => true (this does not handle keywords)

isIdentifierName.start(48) // => false (character code for `0`)
isIdentifierName.cont(48) // => true (character code for `0`)

API

isIdentifierName.name(value)

Checks if the given string is a valid identifier name.

isIdentifierName.start(code)

Checks if the given character code can start an identifier.

isIdentifierName.cont(code)

Checks if the given character code can continue an identifier.

License

MIT © Titus Wormer