is-webp-extended
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
- Vingle - Vingle, Very Community. Love the things that you love. - We're hiring!
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
- sindresorhus/is-webp - Check if a Buffer/Uint8Array is a WebP image
- mooyoul/node-webpinfo - Strongly typed, Stream based WebP Container Parser
License
See full license on mooyoul.mit-license.org