{"name":"esm-env","version":"1.2.2","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.2","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-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA==","_resolved":"/tmp/6e50e3b52c302feda5fe59fd0d2b5495/esm-env-1.2.2.tgz","_from":"file:esm-env-1.2.2.tgz","_nodeVersion":"22.12.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA==","shasum":"263c9455c55861f41618df31b20cb571fc20b75e","tarball":"http://registry-npm.ywwl.com/esm-env/download/esm-env-1.2.2.tgz","fileCount":10,"unpackedSize":3784,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/esm-env@1.2.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDgIAoqE9KspDIt+v1qxmi15G4Mj39SPSC5/4NOoG8oDwIhAIB5XaPji82HqHYoBif6Pmm7aEOatpGAXuo5ZCMRj9x+"}],"size":2183,"noattachment":false,"key":"/esm-env/-/esm-env-1.2.2.tgz"},"_npmUser":{"name":"benmccann","email":"benjamin.j.mccann@gmail.com"},"directories":{},"maintainers":[{"name":"benmccann","email":"benjamin.j.mccann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/esm-env_1.2.2_1736368353989_0.1587185467136174"},"_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":1736368354154,"_cnpm_publish_time":1736368354154,"dist-tags":{"latest":"1.2.2"}}