{"name":"esm-env","version":"1.2.1","repository":{"type":"git","url":"git+https://github.com/benmccann/esm-env.git"},"license":"MIT","homepage":"https://github.com/benmccann/esm-env","author":{"name":"Ben McCann","url":"https://www.benmccann.com"},"type":"module","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./browser":{"browser":"./true.js","development":"./false.js","production":"./false.js","default":"./browser-fallback.js"},"./development":{"development":"./true.js","production":"./false.js","default":"./dev-fallback.js"},"./node":{"node":"./true.js","default":"./false.js"}},"_id":"esm-env@1.2.1","types":"./index.d.ts","description":"Uses export conditions to return environment information in a way that works with major bundlers and runtimes.","bugs":{"url":"https://github.com/benmccann/esm-env/issues"},"_integrity":"sha512-U9JedYYjCnadUlXk7e1Kr+aENQhtUaoaV9+gZm1T8LC/YBAPJx3NSPIAurFOC0U5vrdSevnUJS2/wUVxGwPhng==","_resolved":"/tmp/4ce35b8ae9f5928381d7a0f7ce217d6c/esm-env-1.2.1.tgz","_from":"file:esm-env-1.2.1.tgz","_nodeVersion":"22.11.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-U9JedYYjCnadUlXk7e1Kr+aENQhtUaoaV9+gZm1T8LC/YBAPJx3NSPIAurFOC0U5vrdSevnUJS2/wUVxGwPhng==","shasum":"34c2a0ba60582948afbe7bd779bc66f9d3aece7e","tarball":"http://registry-npm.ywwl.com/esm-env/download/esm-env-1.2.1.tgz","fileCount":10,"unpackedSize":3939,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/esm-env@1.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGisgVwrxJs1EOHHfW+ge48GjbjGlJy5b2d2CkrwFJHHAiAoB035Xp8YIwuRLFMER5SsnPqz5kSibK3N+QPTEM0gqA=="}],"size":2240,"noattachment":false,"key":"/esm-env/-/esm-env-1.2.1.tgz"},"_npmUser":{"name":"benmccann","email":"benjamin.j.mccann@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/esm-env_1.2.1_1732839756717_0.8323242244923852"},"_hasShrinkwrap":false,"readme":"# esm-env\n\nUses export conditions to return environment information in a way that works with major bundlers and runtimes.\n\n## Usage\n\nInstall with `npm install esm-env`, then import as needed:\n\n```js\nimport { BROWSER, DEV, NODE } from 'esm-env';\n```\n\nSpecify `conditions` in your bundler or runtime. For example:\n- [Node.js](https://nodejs.org/api/cli.html#-c-condition---conditionscondition)\n- [Bun](https://bun.sh/docs/runtime/modules#custom-conditions)\n- [Vite/Vitest](https://vite.dev/config/shared-options#resolve-conditions)\n- [webpack](https://webpack.js.org/configuration/resolve/#resolveconditionnames)\n\nIf `esm-env` is used in both bundled code and an externalized library, you will need to specify conditions both at build-time and run-time.\n\n## Acknowledgements\n\nThank you to [dominikg](https://github.com/dominikg) for refining the approach used by this library to suggest a more scalable method for adding additional conditions.\n\n## License\n\n[MIT](LICENSE)\n","publish_time":1732839756887,"maintainers":[{"name":"benmccann","email":"benjamin.j.mccann@gmail.com"}],"_cnpm_publish_time":1732839756887,"dist-tags":{"latest":"1.2.2"}}