buffer-compare
Lexicographically compare two buffers.
Last updated 13 years ago by soldair .
Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install buffer-compare 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.1.1                                ...           latest (10 years ago)

4 Versions

  • 1.1.1                                ...           10 years ago
  • 1.1.0                                ...           10 years ago
  • 1.0.0                                ...           11 years ago
  • 0.0.1                                ...           13 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (1)

Copyright 2013 - present © cnpmjs.org | Home |