0.0.1 • Published 8 years ago
ooxml-type v0.0.1
ooxml-type
Module to get type of ooxml file
Install
npm install ooxml-type
Usage
var fs = require('fs');
var ooxmlType = require('.');
var file = fs.readFileSync('./docx.docx');
console.log(ooxmlType(file));
// > docx
file = fs.readFileSync('./xlsx.xlsx');
console.log(ooxmlType(file));
// > xlsx
file = fs.readFileSync('./pptx.pptx');
console.log(ooxmlType(file));
// > pptx
file = fs.readFileSync('./pdf.pdf');
console.log(ooxmlType(file));
// > null
0.0.1
8 years ago