{"name":"local-pkg","version":"0.0.0","description":"[![NPM version](https://img.shields.io/npm/v/local-pkg?color=a1b858&label=)](https://www.npmjs.com/package/local-pkg)","main":"index.cjs","module":"index.mjs","types":"index.d.ts","exports":{".":{"require":"./index.cjs","import":"./index.mjs"}},"funding":"https://github.com/sponsors/antfu","author":{"name":"Anthony Fu","email":"anthonyfu117@hotmail.com"},"license":"MIT","sideEffects":false,"bugs":{"url":"https://github.com/antfu/local-pkg/issues"},"homepage":"https://github.com/antfu/local-pkg#readme","repository":{"type":"git","url":"git+https://github.com/antfu/local-pkg.git"},"keywords":["package"],"scripts":{"release":"bumpp --commit --push --tag && pnpm publish","test":"node test/cjs.cjs && node test/esm.mjs"},"devDependencies":{"@antfu/eslint-config":"^0.7.0","@antfu/ni":"^0.7.0","@types/chai":"^4.2.22","@types/jasmine":"^3.9.1","@types/node":"^16.7.1","bumpp":"^6.0.6","chai":"^4.3.4","eslint":"^7.32.0","esno":"^0.9.1","jasmine":"^3.9.0","typescript":"^4.3.5","uvu":"^0.5.1"},"dependencies":{"mlly":"^0.2.2"},"gitHead":"71a861e6c4846864a746f9be9ad01f4ae0c53d01","_id":"local-pkg@0.0.0","_nodeVersion":"16.6.2","_npmVersion":"7.20.3","dist":{"integrity":"sha512-C7RtRaCBAUl++M+4yyKywfHoac4scnCKbzlW+mml+0+8j6k9TzDpP57xYe1bbkg5wuSxpITsjVF3OuqJ+l1p9Q==","shasum":"7c6a32d9293f29b5d3106ca04109e5c4ee6d0249","tarball":"http://registry-npm.ywwl.com/local-pkg/download/local-pkg-0.0.0.tgz","fileCount":6,"unpackedSize":5920,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD8eSnr5ipwUl+ceL5UZgUmesWkcTF84dPshtuUqCpccQIgWKYKkV5Y0+wqnjaxRBAy2PWVTjRfSOnB+Ncq/6o1vn0="}],"size":2334,"noattachment":false,"key":"/local-pkg/-/local-pkg-0.0.0.tgz"},"_npmUser":{"name":"antfu","email":"anthonyfu117@hotmail.com"},"directories":{},"maintainers":[{"name":"antfu","email":"anthonyfu117@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/local-pkg_0.0.0_1632774457550_0.9650247235879623"},"_hasShrinkwrap":false,"readme":"# local-pkg\n\n[![NPM version](https://img.shields.io/npm/v/local-pkg?color=a1b858&label=)](https://www.npmjs.com/package/local-pkg)\n\nGet information on local packages. Works on both CJS and ESM.\n\n## Install\n\n```bash\nnpm i local-pkg\n```\n\n## Usage\n\n```ts\nimport {\n  getPackageInfo,\n  importModule,\n  isPackageExists,\n  resolveModule,\n} from 'local-pkg'\n\nisPackageExists('local-pkg') // true\nisPackageExists('foo') // false\n\nawait getPackageInfo('local-pkg')\n/* {\n *   name: \"local-pkg\",\n *   version: \"0.1.0\",\n *   rootPath: \"/path/to/node_modules/local-pkg\",\n *   packageJson: {\n *     ...\n *   }\n * }\n */\n\n// similar to `require.resolve` but works also in ESM\nresolveModule('local-pkg')\n// '/path/to/node_modules/local-pkg/dist/index.cjs'\n\n// similar to `await import()` but works also in CJS\nconst { importModule } = await importModule('local-pkg')\n```\n\n\n## Sponsors\n\n<p align=\"center\">\n  <a href=\"https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg\">\n    <img src='https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg'/>\n  </a>\n</p>\n\n## License\n\n[MIT](./LICENSE) License © 2021 [Anthony Fu](https://github.com/antfu)\n","publish_time":1632774457684,"_cnpm_publish_time":1632774457684,"dist-tags":{"latest":"2.0.0"}}