- removed .Directory and .Paths accessors - build script using bits/ - typescript definitions in misc/
22 lines
615 B
JavaScript
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;
|
|
};
|
|
}
|