buffer-compare
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/buffer-compare package

1.1.1 • Public • Published

Build Status

buffer-compare

Lexicographically compare two buffers.

  var compare = require('buffer-compare');
 
  // smaller
  compare(new Buffer('abcd'),new Buffer(abcde)) === -1
 
  // bigger
  compare(new Buffer('abcdef'),new Buffer('abc')) === 1
 
  // equal
  compare(new Buffer('hi'),new Buffer('hi')) === 0
 

Package Sidebar

Install

npm i buffer-compare

Weekly Downloads

20,341

Version

1.1.1

License

none

Last publish

Collaborators

  • soldair