JSPM

buffer-compare

1.1.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 89374
  • Score
    100M100P100Q149613F

Lexicographically compare two buffers.

Package Exports

  • buffer-compare

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) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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