{"name":"esm-env","version":"1.2.0","author":{"url":"https://www.benmccann.com","name":"Ben McCann"},"license":"MIT","_id":"esm-env@1.2.0","homepage":"https://github.com/benmccann/esm-env","bugs":{"url":"https://github.com/benmccann/esm-env/issues"},"dist":{"shasum":"637c0586244c0eb14bfd7f5e96a6b43b9e8f5c2b","tarball":"http://registry-npm.ywwl.com/esm-env/download/esm-env-1.2.0.tgz","fileCount":9,"integrity":"sha512-OhSQuHL3mUcaQHjGe8UMG8GsJIJHYYz0flR0h9fiTPNMupLMkb7TvcRD0EeJXW5a8GHBgfz08b6FDLNK7kkPQA==","signatures":[{"sig":"MEUCIQCWolQjUCMe8HzHrPU2ZMOgjWOCyMa6rdh/SdE3WS94pQIgWiHGrtOdJmdMY7/Bap3MFHgeoSDU+5sP+L0MWvd5IV4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/esm-env@1.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":4099,"size":2305,"noattachment":false,"key":"/esm-env/-/esm-env-1.2.0.tgz"},"type":"module","_from":"file:esm-env-1.2.0.tgz","types":"./index.d.ts","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./node":{"node":"./true.js","default":"./false.js"},"./browser":{"browser":"./true.js","default":"./false.js"},"./development":{"default":"./dev-fallback.js","production":"./false.js","development":"./true.js"}},"_npmUser":{"name":"benmccann","email":"benjamin.j.mccann@gmail.com"},"_resolved":"/tmp/da58135ead90b43b9a602adc9c6302ab/esm-env-1.2.0.tgz","_integrity":"sha512-OhSQuHL3mUcaQHjGe8UMG8GsJIJHYYz0flR0h9fiTPNMupLMkb7TvcRD0EeJXW5a8GHBgfz08b6FDLNK7kkPQA==","repository":{"url":"git+https://github.com/benmccann/esm-env.git","type":"git"},"_npmVersion":"10.9.0","description":"Uses export conditions to return environment information in a way that works with major bundlers and runtimes.","directories":{},"sideEffects":false,"_nodeVersion":"22.11.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/esm-env_1.2.0_1732750059249_0.4359846359260868","host":"s3://npm-registry-packages"},"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":1732750059413,"maintainers":[{"name":"benmccann","email":"benjamin.j.mccann@gmail.com"}],"_cnpm_publish_time":1732750059413,"dist-tags":{"latest":"1.2.2"}}