Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

is-pdf

kevva2.8kMIT1.0.0

Check if a Buffer/Uint8Array is a 7ZIP file

buffer, check, detect, pdf, type, uint8array

readme

is-pdf Build Status

Check if a Buffer/Uint8Array is a PDF file

Install

$ npm install --save is-pdf

Usage

var isPdf = require('is-pdf');
var read = require('fs').readFileSync;

isPdf(read('foo.pdf'));
// => true

License

MIT License © Kevin Mårtensson