{"name":"reserved-identifiers","version":"1.1.0","keywords":["reserved","identifiers","keywords","words","restricted","javascript","ecmascript","identifier","variable","function","property","set"],"author":{"url":"https://sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"reserved-identifiers@1.1.0","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/reserved-identifiers#readme","bugs":{"url":"https://github.com/sindresorhus/reserved-identifiers/issues"},"dist":{"shasum":"399c46870e82715147d3542e3066da2484de6ad2","tarball":"http://registry-npm.ywwl.com/reserved-identifiers/download/reserved-identifiers-1.1.0.tgz","fileCount":5,"integrity":"sha512-203KzrGTMKVIMmWpNvGpd9DURZDYeC4pDAU9kx2Y4sr+LC8r5noya8Nxptif8kClif/F4VDNsqhulZ/TosEP1Q==","signatures":[{"sig":"MEUCIEC8SC6fB6IMsXqo9NHQV5MXwQrIokS3ttmOtLNpPgkPAiEA2/LexJQ4Wl1B1ble/cWS+0DmDLSCz+Fu0fHJHPhgQ+4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6587,"size":2550,"noattachment":false,"key":"/reserved-identifiers/-/reserved-identifiers-1.1.0.tgz"},"type":"module","types":"./index.d.ts","engines":{"node":">=18"},"exports":{"types":"./index.d.ts","default":"./index.js"},"funding":"https://github.com/sponsors/sindresorhus","gitHead":"924367c94ba2721bc1b64a92a1c97544af81f453","scripts":{"test":"xo && ava"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/reserved-identifiers.git","type":"git"},"_npmVersion":"11.6.1","description":"Provides a list of reserved identifiers for JavaScript","directories":{},"sideEffects":false,"_nodeVersion":"24.9.0","_hasShrinkwrap":false,"devDependencies":{"xo":"^0.58.0","ava":"^6.1.2"},"_npmOperationalInternal":{"tmp":"tmp/reserved-identifiers_1.1.0_1761284899340_0.5603543589701698","host":"s3://npm-registry-packages-npm-production"},"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":1761284899524,"_cnpm_publish_time":1761284899524,"dist-tags":{"latest":"1.2.0"}}