is-cwebp-readable
Check if a Buffer/Uint8Array is available for cwebp image source
const readFileSync = ;const isCwebpReadable = ; ; //=> true; //=> false
Installation
npm install is-cwebp-readable
API
const isCwebpReadable = ;
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