Update from c++ to node.js module