Skip to content
Lexicographically compare two buffers.
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test
.travis.yml
CONTRIBUTING.md
LICENSE
README.md
index.js
package.json

README.md

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
You can’t perform that action at this time.