xsheetjs/bin/ssf.njs
SheetJS 842415c41d ExtendScript
- explicit logical association (&& and ||)
- test for negative pounds (fixes #17 h/t @cesarhermosilla)
- eslint recommended
2017-05-10 01:57:43 -04:00

13 lines
468 B
JavaScript
Executable File

#!/usr/bin/env node
/* ssf.js (C) 2013-present SheetJS -- http://sheetjs.com */
/* eslint-env node */
/* eslint no-console:0 */
var SSF = require('../');
var argv = process.argv.slice(2);
if(argv.length < 2 || argv[0] == "-h" || argv[0] == "--help") {
console.error("usage: ssf <format> <value>");
console.error("output: format_as_string|format_as_number|");
process.exit(0);
}
console.log(SSF.format(argv[0],argv[1]) + "|" + SSF.format(argv[0],+(argv[1])) + "|");