Socket
Socket
Sign inDemoInstall

has-binary2

Package Overview
Dependencies
1
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

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.


Version published
Maintainers
1
Install size
9.32 kB
Created

Package description

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

Changelog

Source

1.0.3 (2018-05-14)

Bug Fixes

  • avoid use of global (#4) (91aa21e)

Readme

Source

has-binarydata.js

Simple module to test if an object contains binary data

FAQs

Last updated on 14 May 2018

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc