is-cwebp-readable
Check if a Buffer/Uint8Array is available for cwebp image source
Last updated 7 years ago by shinnn .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm 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 (7 years ago)
  • 3.0.0-1                                ...           next (7 years ago)

9 Versions

  • 3.0.0                                ...           7 years ago
  • 3.0.0-1                                ...           7 years ago
  • 3.0.0-0                                ...           7 years ago
  • 2.0.1                                ...           9 years ago
  • 2.0.0                                ...           9 years ago
  • 1.0.3                                ...           10 years ago
  • 1.0.2                                ...           11 years ago
  • 1.0.1                                ...           11 years ago
  • 1.0.0                                ...           11 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 3
Dependencies (1)
Dev Dependencies (6)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |