webp.js

0.2.0 • Public • Published

webp.js

npm Build Status Coverage Status

webp.js is a library for webp detection.

Here's an example:

var webpjs = require('webp.js');
if (webpjs()) {
  //do something
}

By using cookie, you can process your images at the backend.

var webpjs = require('webp.js');
if (webpjs({ type:'cookie' })) {
  //do something
}

Get the cookies at the backend, if the value of webp is 1, that means current browser support webp.

Readme

Keywords

Package Sidebar

Install

npm i webp.js

Weekly Downloads

0

Version

0.2.0

License

MIT

Last publish

Collaborators

  • imochen