Added support for node.js and browser to index.js