npm.io
1.0.1 • Published 8 years ago

check-for-webp

Licence
MIT
Version
1.0.1
Deps
0
Vulns
0
Weekly
0
Stars
1

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

Keywords