js-cfb/bits/98_exports.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

22 lines
615 B
JavaScript

if(typeof require !== 'undefined' && typeof exports !== 'undefined') {
Array.prototype.toBuffer = function() {
return Buffer.concat(this[0]);
};
var fs = require('fs');
exports.read = CFB.read;
exports.parse = CFB.parse;
exports.utils = CFB_utils;
exports.main = function(args) {
var cfb = CFB.read(args[0], {type:'file'});
console.log(cfb);
};
if(typeof module !== 'undefined' && require.main === module)
exports.main(process.argv.slice(2));
} else {
Array.prototype.toBuffer = function() {
var x = [];
for(var i = 0; i != this[0].length; ++i) { x = x.concat(this[0][i]); }
return x;
};
}