Raynos / function-bind

MIT License
138 stars 27 forks source link

Check for existence of module before using module.exports #4

Closed jcwilson closed 10 years ago

jcwilson commented 10 years ago

Not all environments define the global variable module. Verify that it exists before using it

ljharb commented 10 years ago

This module is intended to be used only as a CommonJS module. I recommend https://www.npmjs.org/package/browserify if you need to shim "require" in your environment.

If this module was to support other environments, it would do it with a proper UMD, and not just shoving everything into the global scope.