![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
esm-env-robust
Advanced tools
Like [esm-env](https://github.com/benmccann/esm-env), uses export conditions to return environment information in a way that works with major bundlers and runtimes, but this project is also 'robust' in the sense it have also a fallback bahaviour for olde
Like esm-env, uses export conditions to return environment information in a way that works with major bundlers and runtimes,
but this project is also 'robust' in the sense it have also a fallback bahaviour for older environments that doesn't support
the exports
fields in package.json
.
This project was motivated to solve issue esm-env#1, but works for wider audience.
Demo of fallback in old environment: https://svelte.dev/repl/6ae4871d6a48460fb8be28afaf9a6e1d?version=3.54.0
npm install esm-env-robust
. import { BROWSER } from 'esm-env-robust';
DEV
will be false
, use:import { DEV, BROWSER } from 'esm-env-robust/dev-fallback-false';
DEV
will be true
, use:import { DEV, BROWSER } from 'esm-env-robust/dev-fallback-true';
If you don't care about fallback behaviour for older environments at all, consider using the basic esm-env package instead.
BROWSER
The fallback value of BROWSER
is set up on runtime by checking the value of typeof window
.
Currently, code minification tools, as far as we know, don't optimize this value to compile time.
That means you enjoy the most of both worlds by using this package - on updated environments you'll get the correct value on compile time, and on older environments you'll get the correct value on runtime (better than nothing).
FAQs
Like [esm-env](https://github.com/benmccann/esm-env), uses export conditions to return environment information in a way that works with major bundlers and runtimes, but this project is also 'robust' in the sense it have also a fallback bahaviour for olde
We found that esm-env-robust demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.