{"_id":"reserved-identifiers","_rev":"4250409","name":"reserved-identifiers","description":"Provides a list of reserved identifiers for JavaScript","dist-tags":{"latest":"1.2.0"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2026-03-29T21:57:34.000Z","created":"2024-05-05T18:06:34.535Z","1.2.0":"2025-10-25T05:04:04.320Z","1.1.0":"2025-10-24T05:48:19.524Z","1.0.0":"2024-05-05T18:06:34.535Z"},"users":{},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/reserved-identifiers.git"},"versions":{"1.2.0":{"name":"reserved-identifiers","version":"1.2.0","description":"Provides a list of reserved identifiers for JavaScript","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/reserved-identifiers.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":["reserved","identifiers","keywords","words","restricted","javascript","ecmascript","identifier","variable","function","property","set"],"devDependencies":{"ava":"^6.1.2","xo":"^0.58.0"},"gitHead":"e874b2c6dc40a12b3cb2683d3bf91520e98bc08f","types":"./index.d.ts","_id":"reserved-identifiers@1.2.0","bugs":{"url":"https://github.com/sindresorhus/reserved-identifiers/issues"},"homepage":"https://github.com/sindresorhus/reserved-identifiers#readme","_nodeVersion":"24.9.0","_npmVersion":"11.6.1","dist":{"shasum":"d2982cd698e317dd3dced1ee1c52412dbd64fc64","size":2566,"noattachment":false,"key":"/reserved-identifiers/-/reserved-identifiers-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/reserved-identifiers/download/reserved-identifiers-1.2.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/reserved-identifiers_1.2.0_1761368644123_0.5278962491178649"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-10-25T05:04:04.320Z","publish_time":1761368644320,"_source_registry_name":"default","_cnpm_publish_time":1761368644320},"1.1.0":{"name":"reserved-identifiers","version":"1.1.0","description":"Provides a list of reserved identifiers for JavaScript","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/reserved-identifiers.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":["reserved","identifiers","keywords","words","restricted","javascript","ecmascript","identifier","variable","function","property","set"],"devDependencies":{"ava":"^6.1.2","xo":"^0.58.0"},"gitHead":"924367c94ba2721bc1b64a92a1c97544af81f453","types":"./index.d.ts","_id":"reserved-identifiers@1.1.0","bugs":{"url":"https://github.com/sindresorhus/reserved-identifiers/issues"},"homepage":"https://github.com/sindresorhus/reserved-identifiers#readme","_nodeVersion":"24.9.0","_npmVersion":"11.6.1","dist":{"shasum":"399c46870e82715147d3542e3066da2484de6ad2","size":2550,"noattachment":false,"key":"/reserved-identifiers/-/reserved-identifiers-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/reserved-identifiers/download/reserved-identifiers-1.1.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/reserved-identifiers_1.1.0_1761284899340_0.5603543589701698"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-10-24T05:48:19.524Z","publish_time":1761284899524,"_source_registry_name":"default","_cnpm_publish_time":1761284899524},"1.0.0":{"name":"reserved-identifiers","version":"1.0.0","description":"Provides a list of reserved identifiers for JavaScript","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/reserved-identifiers.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":["reserved","identifiers","keywords","words","restricted","javascript","ecmascript","identifier","variable","function","property","set"],"devDependencies":{"ava":"^6.1.2","xo":"^0.58.0"},"_id":"reserved-identifiers@1.0.0","gitHead":"632affa09afcafc8f0db683e4fb1b76cb1d6a721","types":"./index.d.ts","bugs":{"url":"https://github.com/sindresorhus/reserved-identifiers/issues"},"homepage":"https://github.com/sindresorhus/reserved-identifiers#readme","_nodeVersion":"20.12.2","_npmVersion":"10.6.0","dist":{"shasum":"a4878ea2b5130ec2bf5aba40074edcb9704d2623","size":2272,"noattachment":false,"key":"/reserved-identifiers/-/reserved-identifiers-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/reserved-identifiers/download/reserved-identifiers-1.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/reserved-identifiers_1.0.0_1714932394344_0.9120671774349616"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-05-05T18:06:34.535Z","publish_time":1714932394535,"_source_registry_name":"default","_cnpm_publish_time":1714932394535}},"readme":"# reserved-identifiers\n\n> Provides a list of [reserved identifiers](https://262.ecma-international.org/14.0/#sec-keywords-and-reserved-words) for JavaScript\n\nIt assumes the latest JavaScript version (ES2023) and module context. Supporting older JavaScript versions is a non-goal.\n\n## Install\n\n```sh\nnpm install reserved-identifiers\n```\n\n## Usage\n\n```js\nimport reservedIdentifiers from 'reserved-identifiers';\n\nconst identifiers = reservedIdentifiers();\nconst isReserved = identifier => identifiers.has(identifier);\n\nconsole.log(isReserved('await'));\n//=> true\n```\n\n## API\n\n### reservedIdentifiers(options?)\n\nReturns a `Set` with the identifiers.\n\n#### options\n\nType: `object`\n\n##### includeGlobalProperties\n\nType: `boolean`\\\nDefault: `false`\n\nInclude the [global properties](https://tc39.es/ecma262/#sec-value-properties-of-the-global-object) `globalThis`, `Infinity`, `NaN`, and `undefined`. Although not officially reserved, they should typically [not be used as identifiers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined#sect1).\n\n### typeScriptReservedTypes()\n\nReturns a `Set` with TypeScript's built-in types that are reserved and cannot be used for type names (interfaces, type aliases, enums, classes, type parameters).\n\n```js\nimport {typeScriptReservedTypes} from 'reserved-identifiers';\n\nconst types = typeScriptReservedTypes();\n\nconsole.log(types.has('any'));\n//=> true\n\nconsole.log(types.has('unknown'));\n//=> true\n```\n\n## Related\n\n- [is-identifier](https://github.com/sindresorhus/is-identifier) - Check if a string is a valid JavaScript identifier\n","_attachments":{},"homepage":"https://github.com/sindresorhus/reserved-identifiers#readme","bugs":{"url":"https://github.com/sindresorhus/reserved-identifiers/issues"},"license":"MIT"}