JavaScript (browser and node) port of pMARS