JavaScirpt port of NoraMark.