JSPM

is-docx

0.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2363
  • Score
    100M100P100Q103026F
  • License ISC

Detect docx file type from buffer

Package Exports

  • is-docx

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (is-docx) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

is-docx

Detect docx file type from buffer.

Checks for 'PK\x03\x04\x14\x00\x06\x00' at the start of a file buffer.

Install

npm install is-docx

Usage

const fs = require('fs');
const isDocx = require('is-docx');

const file = fs.readFileSync('example.docx');

console.log(isDocx(file)); // > true