Socket
Socket
Sign inDemoInstall

buffer-equal

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

buffer-equal

return whether two buffers are equal


Version published
Maintainers
1
Created

What is buffer-equal?

The buffer-equal npm package is a simple utility for checking if two Node.js Buffer or Uint8Array instances contain the same bytes. It is primarily used for comparing buffers in a way that is both efficient and straightforward.

What are buffer-equal's main functionalities?

Buffer Equality Check

This feature allows you to compare two buffers to determine if they are equal. It returns true if they are equal, false otherwise.

const bufferEqual = require('buffer-equal');
const buf1 = Buffer.from('hello world');
const buf2 = Buffer.from('hello world');
const buf3 = Buffer.from('goodbye');

console.log(bufferEqual(buf1, buf2)); // true
console.log(bufferEqual(buf1, buf3)); // false

Other packages similar to buffer-equal

Keywords

FAQs

Package last updated on 25 May 2014

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