Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

buffer-equal

inspect-js14.7mMIT1.0.1TypeScript support: definitely-typed

return whether two buffers are equal

buffer, equal

readme

buffer-equal Version Badge

github actions coverage License Downloads

npm badge

Return whether two buffers are equal.

example

var bufferEqual = require('buffer-equal');

console.dir(bufferEqual(
    new Buffer([253,254,255]),
    new Buffer([253,254,255])
));
console.dir(bufferEqual(
    new Buffer('abc'),
    new Buffer('abcd')
));
console.dir(bufferEqual(
    new Buffer('abc'),
    'abc'
));

output:

true
false
undefined

methods

var bufferEqual = require('buffer-equal');

bufferEqual(a, b)

Return whether the two buffers a and b are equal.

If a or b is not a buffer, return undefined.

install

With npm do:

npm install buffer-equal

license

MIT

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

v1.0.1 - 2022-10-12

Commits

  • [eslint] fix indentation and whitespace 94b97cd
  • [readme] rename, add badges c08b77f
  • [actions] add reusable workflows ea6a13d
  • [Tests] switch from tap to tape d4681ac
  • [meta] add auto-changelog 50bd71a
  • [eslint] add eslint 084e09e
  • [meta] create FUNDING.yml; add funding in package.json 76b3e31
  • [meta] use npmignore to autogenerate an npmignore file 514a3b7
  • Only apps should have lockfiles 6e6963b
  • [meta] update URLs 0973f5a
  • [meta] add safe-publish-latest db19aab
  • [Tests] add aud in posttest b108d28

v1.0.0 - 2016-01-01

v0.0.2 - 2016-01-01

Commits

v0.0.1 - 2014-05-24

Commits

  • update node versions on travis 0c246a1
  • depend on an old tap version so that travis passes again since they don't have the latest npm daf11fc
  • fix require() 63e755d
  • Use node 0.11+ buffer.equals when available e0131f8

v0.0.0 - 2012-05-11

Commits