{"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":{"integrity":"sha512-yE7KUfFvaBFzGPs5H3Ops1RevfUEsDc5Iz65rOwWg4lE8HJSYtle77uul3+573457oHvBKuHYDl/xqUkKpEEdw==","shasum":"d2982cd698e317dd3dced1ee1c52412dbd64fc64","tarball":"http://registry-npm.ywwl.com/reserved-identifiers/download/reserved-identifiers-1.2.0.tgz","fileCount":5,"unpackedSize":6620,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICt6kLa8ITjZXT3kAUjo9vOg/1Dh+vL4sOcMi6JXNcMtAiB55UOsInDSP4xbxhKwis2TAgk5gO1OyCuKXTSctBKeug=="}],"size":2566,"noattachment":false,"key":"/reserved-identifiers/-/reserved-identifiers-1.2.0.tgz"},"_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/reserved-identifiers_1.2.0_1761368644123_0.5278962491178649"},"_hasShrinkwrap":false,"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","publish_time":1761368644320,"_cnpm_publish_time":1761368644320,"dist-tags":{"latest":"1.2.0"}}