sheetjs_sheetjs/bin/ssf.njs

14 lines
484 B
Plaintext
Raw Normal View History

#!/usr/bin/env node
2017-03-12 07:34:36 +00:00
/* ssf.js (C) 2013-present SheetJS -- http://sheetjs.com */
/* eslint-env node */
/* eslint no-console:0 */
/*jshint node:true */
2017-08-01 02:28:37 +00:00
var X = 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);
}
2017-08-01 02:28:37 +00:00
console.log(X.format(argv[0],argv[1]) + "|" + X.format(argv[0],+(argv[1])) + "|");