Now compatible with both browser and node.js environments.