js-cfb/bits/49_readutils.js
SheetJS d03d13d6f2 version bump 0.8.0: removed old accessors
- removed .Directory and .Paths accessors
- build script using bits/
- typescript definitions in misc/
2013-11-26 10:56:58 -05:00

19 lines
392 B
JavaScript

function readFileSync(filename) {
var fs = require('fs');
var file = fs.readFileSync(filename);
return parse(file);
}
function readSync(blob, options) {
var o = options || {};
switch((o.type || "base64")) {
case "file": return readFileSync(blob);
case "base64": blob = Base64.decode(blob);
/* falls through */
case "binary": blob = s2a(blob); break;
}
return parse(blob);
}