redeem
v0.2.0
Published
require...overloaded to support global lookup
Downloads
5
Maintainers
Readme
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)
}