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

Package detail

browser-pdf-support

featurist440MIT0.2.0

detects support for rendering PDF in browser

pdf, detect, ie, internet, explorer, chrome, safari, firefox, adobe, acrobat, reader

readme

Can I has PDF?

A tiny NPM module that determines if the browser can render PDFs, either with built-in support like Safari, Chrome and Firefox, or with Adobe Acrobat in Internet Explorer.

The module is expected to be used with the amazing browserify.

var pdfSupport = require('browser-pdf-support');

if (pdfSupport()) {
  console.log('we has PDF!');
} else {
  console.log('oh dear, you'll need to download acrobat or a real browser...');
}