{"_id":"is-identifier","_rev":"3-3b8789cd25159a50ba9dea22b0b69ced","name":"is-identifier","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"is-identifier","version":"1.0.0","keywords":["identifier","keyword","word","check","test","reserved","javascript","ecmascript","variable","function","property","is","valid"],"author":{"url":"https://sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"is-identifier@1.0.0","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/is-identifier#readme","bugs":{"url":"https://github.com/sindresorhus/is-identifier/issues"},"dist":{"shasum":"58b6b07a53c633151fa65531d8fa9c6eb6af31a4","tarball":"https://registry.npmjs.org/is-identifier/-/is-identifier-1.0.0.tgz","fileCount":5,"integrity":"sha512-DKRLe7IyxafGKlI6VdPnarF/nZNfvlNJmYAzRVsN2TBJk93qnw6XXvslQ8Nv7MngoMByoyI6tMzSI3M1y/pBKw==","signatures":[{"sig":"MEUCIF9/XmfO2t84QzJgzgzOeBA5DWZBY1TlcThYPQXnKP8HAiEA4CoWPozhfwHHCzBv2GZGoFUJbOFz817+EHpNGahIVYM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3990},"type":"module","types":"./index.d.ts","engines":{"node":">=18"},"exports":{"types":"./index.d.ts","default":"./index.js"},"funding":"https://github.com/sponsors/sindresorhus","gitHead":"f1222ac0a28b04d91d0e83bd25a08c8bbde0968d","scripts":{"test":"xo && ava"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/is-identifier.git","type":"git"},"_npmVersion":"10.6.0","description":"Check if a string is a valid JavaScript identifier","directories":{},"sideEffects":false,"_nodeVersion":"20.12.2","dependencies":{"super-regex":"^1.0.0","identifier-regex":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"xo":"^0.58.0","ava":"^6.1.2"},"_npmOperationalInternal":{"tmp":"tmp/is-identifier_1.0.0_1714933353768_0.8621861292298842","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"is-identifier","version":"1.0.1","keywords":["identifier","keyword","word","check","test","reserved","javascript","ecmascript","variable","function","property","is","valid"],"author":{"url":"https://sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"is-identifier@1.0.1","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/is-identifier#readme","bugs":{"url":"https://github.com/sindresorhus/is-identifier/issues"},"dist":{"shasum":"76d66e7813e37cc85cc8263f04eaa558d1a5d2dc","tarball":"https://registry.npmjs.org/is-identifier/-/is-identifier-1.0.1.tgz","fileCount":5,"integrity":"sha512-HQ5v4rEJ7REUV54bCd2l5FaD299SGDEn2UPoVXaTHAyGviLq2menVUD2udi3trQ32uvB6LdAh/0ck2EuizrtpA==","signatures":[{"sig":"MEUCIDwWHLUESf6cVtorYp26rTmyOdVL/2w3DpaeRUESmvkGAiEA6Gie/crBLy2NiqiMQaTAvLiDkZVmWZ1rVX3AjwENoFo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3974},"type":"module","types":"./index.d.ts","engines":{"node":">=18"},"exports":{"types":"./index.d.ts","default":"./index.js"},"funding":"https://github.com/sponsors/sindresorhus","gitHead":"c97b5573e3a895b18542356ee8b411c1ae68e2f0","scripts":{"test":"xo && ava"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/is-identifier.git","type":"git"},"_npmVersion":"10.6.0","description":"Check if a string is a valid JavaScript identifier","directories":{},"sideEffects":false,"_nodeVersion":"18.20.2","dependencies":{"super-regex":"^1.0.0","identifier-regex":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"xo":"^0.58.0","ava":"^6.1.2"},"_npmOperationalInternal":{"tmp":"tmp/is-identifier_1.0.1_1720786479821_0.8746479581924771","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"is-identifier","version":"1.1.0","description":"Check if a string is a valid JavaScript identifier","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-identifier.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=18"},"scripts":{"test":"xo && ava"},"keywords":["identifier","keyword","word","check","test","reserved","javascript","ecmascript","variable","function","property","is","valid"],"dependencies":{"identifier-regex":"^1.1.0","super-regex":"^1.1.0"},"devDependencies":{"ava":"^6.1.2","xo":"^0.58.0"},"gitHead":"b76423ea0f4b46cfc402f55ebfdb4f58cc31bfe3","types":"./index.d.ts","_id":"is-identifier@1.1.0","bugs":{"url":"https://github.com/sindresorhus/is-identifier/issues"},"homepage":"https://github.com/sindresorhus/is-identifier#readme","_nodeVersion":"22.22.3","_npmVersion":"11.18.0","dist":{"integrity":"sha512-NhOds0mDx9lJu+1lBRO0xbwFo5nobA7GCk/0e5xjr6+6XugX985+0OyGX35BNrTkPAsdLcIKg02HUQJOK8D8kw==","shasum":"6b406e15a429f7196f6496e09f8333bcb4b2db1b","tarball":"https://registry.npmjs.org/is-identifier/-/is-identifier-1.1.0.tgz","fileCount":5,"unpackedSize":5105,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIG/27YyAxEAiRr9QpLvYEggQcI+vasMhm8RtSshjcRdwAiEAyqxzjZKpL7RXymsftlE17jlKva5IH8sDj3NntKY74aM="}]},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/is-identifier_1.1.0_1783210833555_0.3401730143373429"},"_hasShrinkwrap":false}},"time":{"created":"2024-05-05T18:22:33.766Z","modified":"2026-07-05T00:20:33.791Z","1.0.0":"2024-05-05T18:22:33.908Z","1.0.1":"2024-07-12T12:14:39.962Z","1.1.0":"2026-07-05T00:20:33.687Z"},"bugs":{"url":"https://github.com/sindresorhus/is-identifier/issues"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"license":"MIT","homepage":"https://github.com/sindresorhus/is-identifier#readme","keywords":["identifier","keyword","word","check","test","reserved","javascript","ecmascript","variable","function","property","is","valid"],"repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-identifier.git"},"description":"Check if a string is a valid JavaScript identifier","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"readme":"# is-identifier\n\n> Check if a string is a valid [JavaScript identifier](https://developer.mozilla.org/en-US/docs/Glossary/Identifier)\n\n## Install\n\n```sh\nnpm install is-identifier\n```\n\n## Usage\n\n```js\nimport isIdentifier from 'is-identifier';\n\nisIdentifier('foo');\n//=> true\n\nisIdentifier('1kg');\n//=> false\n\nisIdentifier('await'); // Reserved identifier\n//=> false\n```\n\n> [!NOTE]\n> Although `globalThis`, `Infinity`, `NaN`, and `undefined` are [properties of the global object](https://tc39.es/ecma262/#sec-value-properties-of-the-global-object) and not identifiers, they are treated as reserved here because they should generally not be used as identifiers.\n\n## API\n\n### isIdentifier(value, options?)\n\nReturns a boolean for whether the given value is a valid JavaScript identifier.\n\n#### options\n\nType: `object`\n\n##### checkReserved\n\nType: `boolean`\\\nDefault: `true`\n\nReject reserved words and global properties like `if`, `await`, and `undefined`.\n\nThese are valid identifier syntax but should not be used as variable names, so they are rejected by default. Disable this when you only care about the syntax, such as for property keys (`{if: 1}`) or dot notation (`foo.for`), where they are allowed.\n\n```js\nimport isIdentifier from 'is-identifier';\n\nisIdentifier('for', {checkReserved: false});\n//=> true\n```\n\n## Related\n\n- [to-valid-identifier](https://github.com/sindresorhus/to-valid-identifier) - Convert a string to a valid JavaScript identifier\n- [identifier-regex](https://github.com/sindresorhus/identifier-regex) - Regular expression for matching valid JavaScript identifiers\n- [reserved-identifiers](https://github.com/sindresorhus/reserved-identifiers) - Provides a list of reserved identifiers for JavaScript\n","readmeFilename":"readme.md"}