You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{cont,name,start}from'estree-util-is-identifier-name'name('$something69')// => truename('69')// => falsename('var')// => true (this does not handle keywords)start(48)// => false (code point for `'0'`)cont(48)// => true (code point for `'0'`)
API
This package exports the identifiers cont,
name, and
start.
There is no default export.
cont(code[, options])
Checks if the given code point can continue an identifier.
Checks if the given code point can start an identifier.
Parameters
code (number)
— code point to check
Returns
Whether code can start an identifier (boolean).
Options
Configuration (TypeScript type).
Fields
jsx (boolean, default: false)
— support JSX identifiers.
Types
This package is fully typed with TypeScript.
It exports the additional type Options.
Compatibility
Projects maintained by the unified collective are compatible with maintained
versions of Node.js.
When we cut a new major release, we drop support for unmaintained versions of
Node.
This means we try to keep the current release line,
estree-util-is-identifier-name@^3, compatible with Node.js 16.