redeem

0.2.0 • Public • Published

redeem

redeem overloads your require function with a fallback to global lookup for use in mixed environments.

npm install redeem --save

Example

overload the existing require function

require('redeem')()

imagine a global

window.foo = 'bar'

then require elsewhere

module.exports = function() {
  var foo = require('foo')
  console.log(foo)
}

Package Sidebar

Install

npm i redeem

Weekly Downloads

0

Version

0.2.0

License

MIT

Last publish

Collaborators

  • ryanve