1.0.1 • Published 6 years ago

check-for-webp v1.0.1

Weekly downloads
21
License
MIT
Repository
github
Last release
6 years ago

npm version

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