Skip to content

mooyoul/is-webp-extended

Repository files navigation

is-webp-extended

workflow Semantic Release enabled npm bundle size (minified) Renovate enabled MIT license

Extended version of sindresorhus/is-webp, which added Animated WebP detection support. also it does not have any dependency. so tiny!

It takes File or ArrayBuffer and checks given file is WebP, or Animated WebP. If File is provided, package automatically handles additional requirements like seeking, buffering...

Sponsor

Demo

https://mooyoul.github.io/is-webp-extended/

Install

from NPM

$ npm install is-webp-extended --save

from unpkg

<script src="https://unpkg.com/is-webp-extended" type="text/javascript" ></script>

Supported WebP Formats

  • Simple File Format (Lossy)
  • Simple File Format (Lossless)
  • Extended File Format (e.g. Animated WebP)

API

isWebP(input: ArrayBuffer | File) => Promise<boolean>

returns given input is WebP or not

isAnimatedWebP(input: ArrayBuffer | File) => Promise<boolean>

returns given input is Animated WebP or not

Changelog

See CHANGELOG.

Testing

$ npm run test

Build

$ npm run build

Related

License

MIT

See full license on mooyoul.mit-license.org

About

Extended version of is-webp package which supports Animated WebP

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •