Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
36K
decreased by-81.04%
Maintainers
1
Weekly downloads
 
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

const fs = require('fs');
const 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

const 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

The Unlicense

Keywords

FAQs

Package last updated on 02 May 2017

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