Use same module for node.js and browsers