is-cwebp-readable
Check if a Buffer/Uint8Array is available for cwebp image source
Last updated 8 years ago by shinnn .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ npm install is-cwebp-readable 
SYNC missed versions from official npm registry.

is-cwebp-readable

npm version Build Status Coverage Status

Check if a Buffer/Uint8Array is available for cwebp image source

const {readFileSync} = require('fs');
const isCwebpReadable = require('is-cwebp-readable');

isCwebpReadable(readFileSync('fixture.png')); //=> true
isCwebpReadable(readFileSync('fixture.bmp')); //=> false

Installation

Use npm.

npm install is-cwebp-readable

API

const isCwebpReadable = require('is-cwebp-readable');

isCwebpReadable(data)

data: Buffer or Uint8Array
Return: boolean

It returns true if the data is PNG, JPEG, TIFF, or WebP, otherwise false.

License

ISC License © 2018 Shinnosuke Watanabe

Current Tags

  • 3.0.0                                ...           latest (8 years ago)
  • 3.0.0-1                                ...           next (8 years ago)

9 Versions

  • 3.0.0                                ...           8 years ago
  • 3.0.0-1                                ...           8 years ago
  • 3.0.0-0                                ...           8 years ago
  • 2.0.1                                ...           10 years ago
  • 2.0.0                                ...           10 years ago
  • 1.0.3                                ...           11 years ago
  • 1.0.2                                ...           11 years ago
  • 1.0.1                                ...           12 years ago
  • 1.0.0                                ...           12 years ago
Maintainers (1)
Downloads
Total 57
Today 0
This Week 0
This Month 18
Last Day 0
Last Week 4
Last Month 29
Dependencies (1)
Dev Dependencies (6)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE