Socket
Socket
Sign inDemoInstall

is-cwebp-readable

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-cwebp-readable

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


Version published
Maintainers
1
Created
Source

is-cwebp-readable

NPM version Build Status Build status Coverage Status Dependency Status devDependency Status

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

var fs = require('fs');
var isCwebpReadable = require('is-cwebp-readable');

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

Installation

Use npm.

npm install is-cwebp-readable

API

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

isCwebpReadable(buf)

buf: Buffer or Uint8Array
Return: Boolean

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

License

Copyright (c) Shinnosuke Watanabe

Licensed under the MIT License.

Keywords

FAQs

Package last updated on 28 Jan 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc