Wondering what’s next for npm?Check out our public roadmap! »

has-package-exports
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/has-package-exports package

1.2.2 • Public • Published

has-package-exports Version Badge

Build Status 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 v14.13+).

Tests

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

Install

npm i has-package-exports

DownloadsWeekly Downloads

619

Version

1.2.2

License

MIT

Unpacked Size

15.8 kB

Total Files

12

Last publish

Collaborators

  • avatar