Parser combinator in JS ( node.js)