check-for-webp
v1.0.1
Published
client side browser check for webp support
Downloads
1,546
Maintainers
Readme
check-for-webp
Client-side check for webp support in the browser based on Canvas (IE9+).
caniuse webp browser coverage
Installation
npm install check-for-webp
or
yarn add check-for-webp
How To Use
import webp from 'check-for-webp'
The check is done once and the result cached.
console.log(webp); // will output [boolean] true || false try it on FireFox and Chrome