is-webp-extended
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i is-webp-extended

Weekly Downloads

18

Version

1.0.3

License

MIT

Unpacked Size

15.1 kB

Total Files

7

Last publish

Collaborators

  • mooyoul