JSPM

buffer-compare-numeric

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q36593F
  • License ISC

Compare (Big Endian) Buffers numerically

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-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