{"_id":"is-core-module@2.18.0","bugs":{"url":"https://github.com/inspect-js/is-core-module/issues"},"dist":{"shasum":"8a988af8d3729fb6bbcaf025bf820cfe46b95f4c","tarball":"http://registry-npm.ywwl.com/is-core-module/download/is-core-module-2.18.0.tgz","integrity":"sha512-qyax9fgaKOEC4qK8WZn7Q4IcoZC9RC1O1fFxRcRTq/oMMkWT/uXpqpXa12kzWR409zAt1drYN9N9BO26UmBCmw==","fileCount":7,"unpackedSize":33689,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIC3qDAO3dI//XAI4uM6aG9UGtsTQ7sHU6ci+yEYLtT42AiAj5G40ptQtqOn7d316g3dw8aaiu8HVPkKPcH6nd2026g=="}],"size":10394,"noattachment":false,"key":"/is-core-module/-/is-core-module-2.18.0.tgz"},"main":"index.js","name":"is-core-module","types":"./index.d.ts","author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"engines":{"node":">= 0.4"},"exports":{".":"./index.js","./package.json":"./package.json"},"funding":{"url":"https://github.com/sponsors/ljharb"},"gitHead":"335346560808d35b44a2bded673c0cc3376e29bb","license":"MIT","scripts":{"lint":"eslint .","test":"npm run tests-only","prepack":"npmignore --auto --commentLines=autogenerated","pretest":"npm run lint","version":"auto-changelog && git add CHANGELOG.md","postlint":"tsc -p . && attw -P","posttest":"npx npm@'>=10.2' audit --production","prepublish":"not-in-publish || npm run prepublishOnly","tests-only":"nyc tape 'test/**/*.js'","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"","dependencies":"node -p \"process.env.npm_command\" | npx \"dt-clean@^1.2.2\" --auto","prepublishOnly":"safe-publish-latest"},"version":"2.18.0","_npmUser":{"name":"ljharb","email":"ljharb@gmail.com","approver":{"name":"ljharb","email":"ljharb@gmail.com"}},"homepage":"https://github.com/inspect-js/is-core-module","keywords":["core","modules","module","npm","node","dependencies"],"repository":{"url":"git+https://github.com/inspect-js/is-core-module.git","type":"git"},"_npmVersion":"12.1.0","description":"Is this specifier a node.js core module?","directories":{},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"sideEffects":false,"_nodeVersion":"27.0.0-alpha.0.0.0","dependencies":{"hasown":"^2.0.4"},"publishConfig":{"ignore":[".github",".nycrc","eslint.config.mjs","tsconfig.json","test"]},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","hideCredit":true,"unreleased":false,"commitLimit":false,"backfillLimit":false},"devDependencies":{"nyc":"^10.3.2","jiti":"^0.0.0","tape":"^5.10.3","eslint":"^10.14.0","semver":"^6.3.1","npmignore":"^0.3.6","in-publish":"^2.0.1","typescript":"next","@types/node":"^26.6.6","object-keys":"^1.1.1","@types/semver":"^6.2.7","mock-property":"^1.1.2","auto-changelog":"^2.7.0","@ljharb/tsconfig":"^0.3.2","@types/object-keys":"^1.0.3","safe-publish-latest":"^2.0.0","@arethetypeswrong/cli":"^0.18.5","@ljharb/eslint-config":"^22.2.5"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/is-core-module_2.18.0_1793727946718_0.36893142693185044"},"_hasShrinkwrap":false,"readme":"# is-core-module <sup>[![Version Badge][2]][1]</sup>\n\n[![github actions][actions-image]][actions-url]\n[![coverage][codecov-image]][codecov-url]\n[![dependency status][5]][6]\n[![dev dependency status][7]][8]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][11]][1]\n\nIs this specifier a node.js core module? Optionally provide a node version to check; defaults to the current node version.\n\n## Example\n\n```js\nvar isCore = require('is-core-module');\nvar assert = require('assert');\nassert(isCore('fs'));\nassert(!isCore('butts'));\n```\n\n## TypeScript\n\n`isCore` accepts any string. `isCore.Module` is the union of every specifier in `core.json`, regardless of node version, so editors can suggest them.\n\nThe types import `core.json`, so [`resolveJsonModule`](https://www.typescriptlang.org/tsconfig/#resolveJsonModule), [`esModuleInterop`](https://www.typescriptlang.org/tsconfig/#esModuleInterop), and [`allowSyntheticDefaultImports`](https://www.typescriptlang.org/tsconfig/#allowSyntheticDefaultImports) must be enabled; some `module` and `moduleResolution` settings enable them by default, but `node16` does not enable `resolveJsonModule`.\nWithout them, TypeScript reports an error in this package's `index.d.ts`, or, with `skipLibCheck`, `isCore.Module` silently widens to `string | number | symbol`.\n\n```ts\nimport isCore = require('is-core-module');\n\nfunction isBuiltin(specifier: string): boolean {\n\treturn isCore(specifier); // any string is accepted\n}\n\nconst name: isCore.Module = 'node:fs'; // only specifiers listed in `core.json`\nisCore(name, '16.0.0'); // true\n```\n\n## Tests\nClone the repo, `npm install`, and run `npm test`\n\n[1]: https://npmjs.org/package/is-core-module\n[2]: https://versionbadg.es/inspect-js/is-core-module.svg\n[5]: https://david-dm.org/inspect-js/is-core-module.svg\n[6]: https://david-dm.org/inspect-js/is-core-module\n[7]: https://david-dm.org/inspect-js/is-core-module/dev-status.svg\n[8]: https://david-dm.org/inspect-js/is-core-module#info=devDependencies\n[11]: https://nodei.co/npm/is-core-module.png?downloads=true&stars=true\n[license-image]: https://img.shields.io/npm/l/is-core-module.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/is-core-module.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=is-core-module\n[codecov-image]: https://codecov.io/gh/inspect-js/is-core-module/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/inspect-js/is-core-module/\n[actions-image]: https://img.shields.io/github/check-runs/inspect-js/is-core-module/main\n[actions-url]: https://github.com/inspect-js/is-core-module/actions\n","publish_time":1793727946799,"_cnpm_publish_time":1793727946799,"dist-tags":{"latest":"2.18.0"}}