js-crc32/misc/make_unicode.njs
SheetJS e1c9c5e5cd version bump 0.4.1
- normalized crc iteration logic
- added browser demo
- added command line tool crc32
- fixed unicode baseline script (node 6 changed default array printing)
- fixed performance tests (benchmark module changed behavior)
- updated travis versions for test
- miscellaneous adjustments to tooling
2016-06-16 17:16:58 -04:00

15 lines
503 B
JavaScript

#!/usr/bin/env node
/* make_unicode.njs -- generate baselines for tests
* Copyright (C) 2016-present SheetJS
* vim: set ft=javascript: */
var argv = process.argv.slice(2);
var enc = require('codepage').utils.encode;
function arr(x) { return [].slice.call(enc(65001, x)); }
var o = require('./uctable.' + argv[0]).map(arr);
/* node 6 changed default behavior for arrays */
if(+process.version.replace(/v(\d)+\..*/,"$1") >= 6) o = require("util").inspect(o, {maxArrayLength: null});
console.log(o);