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

has-binary2

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

has-binary2

A function that takes anything in javascript and returns true if its argument contains binary data.

  • 1.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.1M
decreased by-11.1%
Maintainers
1
Weekly downloads
 
Created

What is has-binary2?

The has-binary2 npm package is used to check whether an object contains any binary data (in the form of ArrayBuffer, Blob, File, or other types). It is commonly used in applications that need to handle different types of data and specifically identify binary data, such as when working with WebSockets or other real-time communication protocols.

What are has-binary2's main functionalities?

Detecting binary data in objects

This feature allows you to check if an object contains binary data. The function returns true if any binary data is found within the object.

const hasBinary = require('has-binary2');

const obj = { hello: 'world', image: new Buffer('binarydata') };
const containsBinary = hasBinary(obj); // returns true

Other packages similar to has-binary2

FAQs

Package last updated on 14 May 2018

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