{"name":"local-pkg","version":"0.0.1","description":"","main":"index.cjs","module":"index.mjs","types":"index.d.ts","exports":{".":{"require":"./index.cjs","import":"./index.mjs"}},"funding":{"url":"https://github.com/sponsors/antfu"},"author":"Anthony Fu <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"],"devDependencies":{"@antfu/eslint-config":"^0.7.0","@antfu/ni":"^0.7.0","@antfu/utils":"^0.3.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"},"scripts":{"release":"bumpp --commit --push --tag && pnpm publish","test":"node test/cjs.cjs && node test/esm.mjs"},"_id":"local-pkg@0.0.1","_integrity":"sha512-0LbcrI8fUlGJEXjErIvDzFtwUA+hKa33iZouv+PrmjER0+6zjQAoUHMa5NRoOFy64TxqH/nFWeIebFGbVNoi9w==","_resolved":"/Users/antfu/i/local-pkg/local-pkg-0.0.1.tgz","_from":"file:local-pkg-0.0.1.tgz","_nodeVersion":"16.6.2","_npmVersion":"7.20.3","dist":{"integrity":"sha512-0LbcrI8fUlGJEXjErIvDzFtwUA+hKa33iZouv+PrmjER0+6zjQAoUHMa5NRoOFy64TxqH/nFWeIebFGbVNoi9w==","shasum":"37cf0d46ef2da0230d6e8a0bcd3be6ac0b651b16","tarball":"http://registry-npm.ywwl.com/local-pkg/download/local-pkg-0.0.1.tgz","fileCount":6,"unpackedSize":6626,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH1tROCQv1CpZAf8m1QHlwBaKUqm/brNJPRZn80HTyAwAiEA9kvGszUFscbrmKD4E5kgCpkToYUx+APKR3YmLjwkSfI="}],"size":2486,"noattachment":false,"key":"/local-pkg/-/local-pkg-0.0.1.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.1_1632777182950_0.7812009375135454"},"_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":1632777183095,"_cnpm_publish_time":1632777183095,"dist-tags":{"latest":"2.0.0"}}