1.0.3 • Published 5 years ago

is-webp-extended v1.0.3

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

is-webp-extended

Build Status 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.com/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

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

6 years ago