esm-env
npmv1.2.2TypeScriptUses export conditions to return environment information in a way that works with major bundlers and runtimes.
Adopt with care
esm-env is usable, with caveats. Last published 609 days ago. 8 releases in the last 2 years.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- CMaintenance: grade C, Fair — worth a look.
Last published 609 days ago. 8 releases in the last 2 years.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 3.7 KB installed.
- BSupply chain: grade B, Good.
This package has a single maintainer (bus factor of 1).
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding esm-env to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Node.js
- No constraint declared
- Module format
- ESM only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the esm-env README.
import { BROWSER, DEV, NODE } from 'esm-env';Used by
Popular packages that depend on esm-env.
Relationship graph
Dependencies (left) and dependents (right) of esm-env.
Frequently installed together
An extremely fast JavaScript and CSS bundler and minifier.
ECMAScript parser
TypeScript definitions for estree
Next generation testing framework powered by Vite
Programmatic access to information about the AXObject Model
Gets the job done when JSON.stringify can't
Determine whether an AST node is a reference
Acorn plugin that parses TypeScript
TypeScript definitions for trusted-types
A tiny (239B) utility for constructing className strings conditionally.
A tool for walking ASTs
Get the line and column number of a specific character in a string
Release history
1 release in the last two years, typically about 1 day apart.
| Version | Published | Size | License |
|---|---|---|---|
| 1.2.2latest | 1 year ago | 3.7 KB | MIT |
| 1.2.1 | 1 year ago | 3.8 KB | MIT |
| 1.2.0 | 1 year ago | 4.0 KB | MIT |
| 1.1.4 | 1 year ago | 2.8 KB | MIT |
| 1.1.3 | 1 year ago | 2.8 KB | MIT |
| 1.1.2 | 1 year ago | 2.8 KB | MIT |
| 1.1.1 | 1 year ago | 2.9 KB | MIT |
| 1.1.0 | 1 year ago | 2.9 KB | MIT |
| 1.0.0 | 3 years ago | 2.1 KB | MIT |
Overview
esm-env is an npm package that uses export conditions to return environment information in a way that works with major bundlers and runtimes. It has 1 known dependents in the graph. The latest version is 1.2.2, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need uses export conditions to return environment information in a way that works with major bundlers and runtimes and value a focused solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.
Pros
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
- Zero runtime dependencies — minimal footprint.
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Frequently asked questions
Should I use esm-env?
esm-env is usable, with caveats. Last published 609 days ago. 8 releases in the last 2 years.
How do I install esm-env?
Run `npm install esm-env` to add esm-env to your npm project.
What license is esm-env released under?
esm-env is distributed under the MIT license.
How popular is esm-env?
npm does not publish download counts. Within PackageGraph's crawl, 1 known packages depend on esm-env.
Is esm-env still maintained?
The most recent release of esm-env (v1.2.2) was published 1 year ago.
Does esm-env run install scripts?
No. esm-env does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.