buffer-compare-numeric
Compare (Big Endian) Buffers numerically
Last updated 4 years ago by emilbay .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install buffer-compare-numeric 
SYNC missed versions from official npm registry.

buffer-compare-numeric

Compare (Big Endian) Buffers numerically

Install

npm install buffer-compare-numeric

Usage

Will compare (Big Endian) Buffers numerically, ignoring leading zeros.

var cmp = require('buffer-compare-numeric')

var a = Buffer([16])
var b = Buffer([00, 17])

[a, b].sort(Buffer.compare) // [b, a]
[a, b].sort(cmp) // [a, b]

License

ISC

Current Tags

  • 1.0.1                                ...           latest (4 years ago)

2 Versions

  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (2)
Downloads
Today 1
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |