JSPM

fs-constants

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 19870444
  • Score
    100M100P100Q223746F
  • License MIT

Require constants across node and the browser

Package Exports

  • fs-constants

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (fs-constants) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

fs-constants

Small module that allows you to get the fs constants across Node and the browser.

npm install fs-constants

Previously you would use require('constants') for this in node but that has been deprecated and changed to require('fs').constants which does not browserify.

This module uses require('constants') in the browser and require('fs').constants in node to work around this

Usage

var constants = require('fs-constants')

console.log('constants:', constants)

License

MIT