Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

has-package-exports

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

has-package-exports

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

  • 1.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7.6K
increased by3.89%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

FAQs

Package last updated on 07 Apr 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc