Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

is-gif

2.0.0 • Public • Published

is-gif Build Status

Check if a Buffer/Uint8Array is a GIF image

Install

$ npm install is-gif

Usage

const readChunk = require('read-chunk');
const isGif = require('is-gif');
 
const buffer = readChunk.sync('unicorn.gif', 0, 3);
isGif(buffer);
//=> true

API

isGif(input)

input

Type: Buffer Uint8Array

It only needs the first 3 bytes.

Related

  • file-type - Detect the file type of a Buffer/Uint8Array

License

MIT © Sindre Sorhus

install

npm i is-gif

Downloadsweekly downloads

342,110

version

2.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability