0.0.1 • Published 7 years ago

hidden-require v0.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

hidden-require Build Status

This library is intended at hiding and making some dependencies in node libraries optional when bundled in webpack/browserify.

Example:

const hiddenRequire = require('hidden-require');

/*
allow request to be optional to allow for other platforms to shim request
  fetch, google app script (UrlFetchApp), etc.. many more

More use cases:
  - node-gyp dependencies where there are c/c++ bindings
*/
module.exports = (request = hiddenRequire('request')) => {
  ...// do something with request and then some
}
0.0.1

7 years ago