estree-util-is-identifier-name is a focused utility from the unified collective designed to determine whether a given string or Unicode code point can constitute a valid ECMAScript (JavaScript) identifier name. The package, currently at stable version 3.0.0, provides functions like `name` to validate full identifier strings, and `start` and `cont` to check individual code points for starting or continuing an identifier. Major releases, such as v3.0.0, typically coincide with updates to Node.js compatibility (now requiring Node.js 16+) and significant internal changes like the adoption of `exports` for module resolution and enhanced Unicode support for astrals and code points. A key differentiator is its strict adherence to ECMAScript identifier rules, including optional support for JSX identifiers, while intentionally not handling language keywords. It's an ESM-only package since v2.0.0 and ships with full TypeScript types.
npm install estree-util-is-identifier-nameVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to validate full identifier names and individual code points for starting or continuing an identifier, including the optional JSX support.
Upgrade your Node.js environment to version 16 or higher.
Ensure you are passing actual Unicode code points (e.g., from `String.prototype.codePointAt()`) to `cont` and `start`.
Migrate your codebase to use ES Modules (`import`) or ensure your environment supports dynamic `import()` for CommonJS contexts.
Always use the main entry points (e.g., `import { name } from 'estree-util-is-identifier-name'`) and avoid direct imports from sub-paths or internal files.Change `const { name } = require('estree-util-is-identifier-name')` to `import { name } from 'estree-util-is-identifier-name'` and ensure your project is configured for ES Modules.Ensure you pass a valid Unicode code point number (an integer) to `start` and `cont`. Use `String.prototype.codePointAt(index)` to get the correct code point for a character, especially for characters outside the Basic Multilingual Plane.
Change `import name from 'estree-util-is-identifier-name'` to `import { name } from 'estree-util-is-identifier-name'`.No dependency data recorded yet.