validate-asm
Like JSLint, but for asm.js
example
Let's say you have an asm module called GeometricMean.js
:
{ "use asm"; var exp = stdlibMathexp; var log = stdlibMathlog; var values = buffer; { start = start|0; end = end|0; var sum = 00 p = 0 q = 0; // asm.js forces byte addressing of the heap by requiring shifting by 3 for p = start << 3 q = end << 3; p|0 < q|0; p = p + 8|0 sum = sum + +; return +sum; } { start = start|0; end = end|0; return +; } return geometricMean: geometricMean ;} moduleexports = GeometricMean;
In order to validate it, simply run
validate-asm GeometricMean.js
That's it!
install
With npm do:
npm install -g validate-asm
usage
Usage: validate-asm [entry files] {OPTIONS}
Standard Options:
--help, -h Show this message
Specify a parameter.
license
ISC