Skip to content

Does the current node version have support for the "exports" field in package.json?

License

Notifications You must be signed in to change notification settings

inspect-js/has-package-exports

Repository files navigation

has-package-exports Version Badge

dependency status dev dependency status License Downloads

npm badge

Does the current node version have support for the "exports" field in package.json?

At the time of this writing, node v12.17+ and v13+ has support for the "exports" field in package.json.

This library exports true if the current node version supports it, false if it does not, and null if it's in a browser.

Require or import has-package-exports/conditional to determine if the current environment supports conditional exports (as of this writing, node v12.17+ and v13.7+).

Require or import has-package-exports/pattern to determine if the current environment supports exports patterns (as of this writing, node v12.20+ and v14.13+).

Require or import has-package-exports/pattern-trailers to determine if the current environment supports exports pattern trailers (as of this writing, node v14.19+ and v16.9+).

Tests

Simply clone the repo, npm install, and run npm test

About

Does the current node version have support for the "exports" field in package.json?

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks