JSPM

buffer-compare-shim

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 37
  • Score
    100M100P100Q40063F
  • License MIT

Shims Node v0.10.x with v0.12.x `Buffer.compare` and `Buffer.prototype.compare` functionality.

Package Exports

  • buffer-compare-shim

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-shim) 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-polyfill

Shims Node v0.10.x with v0.12.x Buffer.compare and Buffer.prototype.compare functionality.

See v.12 API Docs

  Buffer('123').compare(Buffer('123')); // 0
  Buffer('123').compare(Buffer('1230')); // -1
  Buffer('1230').compare(Buffer('123')); // 1

  Buffer.compare(Buffer('123'), Buffer('123')); // 0
  Buffer.compare(Buffer('123'), Buffer('1230')); // -1
  Buffer.compare(Buffer('1230'), Buffer('123')); // 1