Added a Node.js port.

Of the scan function.