I want to use some features for server-side javascript. I think prototype is checking the browser type, but of course node.js is not a browser. I get the following error:
$ node
> require('./prototype') ;
ReferenceError: navigator is not defined
at /home/guest/projects/javascript/prototype.js:14:5
at Object.<anonymous> (/home/guest/projects/javascript/prototype.js:23:4)
at Module._compile (node.js:462:23)
at Module._loadScriptSync (node.js:469:10)
at Module.loadSync (node.js:338:12)
at loadModule (node.js:283:14)
at require (node.js:411:14)
at cwdRequire (repl:29:10)
at [object Context]:1:1
at Interface.<anonymous> (repl:96:19)
prototype.js is version 1.7, node.js is version 0.2.6