# is-webm

> Check if a Buffer/Uint8Array is a WEBM video

Latest version **2.0.0** (published 2018-05-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install is-webm
pnpm add is-webm
yarn add is-webm
bun add is-webm
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2018-05-06 |
| First published | 2016-01-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6 |
| Dependencies | 0 |
| Unpacked size | 2.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | t1st3 |
| Maintainers | t1st3 |
| Keywords | webm, video, web, type, detect, check, is, binary, buffer, uint8array |

## Links

- npm: https://www.npmjs.com/package/is-webm
- Repository: https://github.com/t1st3/is-webm
- Homepage: https://github.com/t1st3/is-webm#readme
- Issues: https://github.com/t1st3/is-webm/issues
- npm.io page: https://npm.io/package/is-webm

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2018-05-06
- 1.1.0 — 2018-05-06
- 1.0.0 — 2017-04-11
- 0.1.0 — 2016-01-18

## README

# is-webm

[![NPM version](https://img.shields.io/npm/v/is-webm.svg)](https://www.npmjs.com/package/is-webm)
[![Build Status](https://travis-ci.org/t1st3/is-webm.svg?branch=master)](https://travis-ci.org/t1st3/is-webm)

> Check if a Buffer/Uint8Array is a [WEBM](https://en.wikipedia.org/wiki/WebM) video.


## Install

```sh
$ npm install --save is-webm
```


## Usage

### Node.js

```js
var readChunk = require('read-chunk'); // npm install read-chunk
var isWebm = require('is-webm');
var buffer = readChunk.sync('unicorn.webm', 0, 4);

isWebm(buffer);
//=> true
```

### Browser

```js
var xhr = new XMLHttpRequest();
xhr.open('GET', 'unicorn.webm');
xhr.responseType = 'arraybuffer';

xhr.onload = function () {
	isWebm(new Uint8Array(this.response));
	//=> true
};

xhr.send();
```


## API

### isWebm(buffer)

Accepts a Buffer (Node.js) or Uint8Array.

It only needs the first 4 bytes.


## License

MIT © [t1st3](https://t1st3.com)

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