Package Exports
- buffer-compare-numeric
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (buffer-compare-numeric) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
buffer-compare-numeric
Compare (Big Endian) Buffers numerically
Install
npm install buffer-compare-numericUsage
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]