ooxml-type

0.0.1 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i ooxml-type

Weekly Downloads

6,607

Version

0.0.1

License

ISC

Last publish

Collaborators

  • overra