fix npe
hey, just added a quick bugfix to check that module is defined - using this lib in a browser was throwing an error.
I prefer to idiot-proof it, in case module is something like null:
try { module.exports = URI; } catch(ex) {}
...but maybe that's overkill?
Sure, that should work, but in node it seems to be okay either way?
foo ReferenceError: foo is not defined at [object Context]:1:1 at Interface.
(repl.js:171:22) at Interface.emit (events.js:64:17) at Interface._onLine (readline.js:153:10) at Interface._line (readline.js:408:8) at Interface._ttyWrite (readline.js:585:14) at ReadStream. (readline.js:73:12) at ReadStream.emit (events.js:81:20) at ReadStream._emitKey (tty_posix.js:307:10) at ReadStream.onData (tty_posix.js:70:12) typeof(foo) 'undefined'