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
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.
Related
goto-bus-stop/estree-is-identifier
— check if an AST node is an identifier