# webp.js

> A library for webp detection

Latest version **0.2.0** (published 2017-08-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install webp.js
pnpm add webp.js
yarn add webp.js
bun add webp.js
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2017-08-20 |
| First published | 2017-08-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 30 |
| Author | mochen |
| Maintainers | mochen |
| Keywords | webpjs, webp, webp.js |

## Links

- npm: https://www.npmjs.com/package/webp.js
- Repository: https://github.com/imochen/webp.js
- Homepage: https://github.com/imochen/webp.js#readme
- Issues: https://github.com/imochen/webp.js/issues
- npm.io page: https://npm.io/package/webp.js

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 0.2.0 (latest) — 2017-08-20
- 0.1.0 — 2017-08-16
- 0.0.0 — 2017-08-16

## README

# webp.js
[![npm](https://img.shields.io/npm/v/webp.js.svg)](https://www.npmjs.com/package/webp.js)  [![Build Status](https://travis-ci.org/imochen/webp.js.svg?branch=master)](https://travis-ci.org/imochen/webp.js) [![Coverage Status](https://coveralls.io/repos/github/imochen/webp.js/badge.svg?branch=master)](https://coveralls.io/github/imochen/webp.js?branch=master)

webp.js is a library for webp detection.

Here's an example:
```javascript
var webpjs = require('webp.js');
if (webpjs()) {
  //do something
}
```
By using cookie, you can process your images at the backend.

```javascript
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.

---
_Source: https://npm.io/package/webp.js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
