Red-black tree for Node.js and the browser