buf-compare

Node.js `Buffer.compare()` ponyfill

Just use `Buffer.compare()`. It has been available since Node.js 0.12.
Last updated 8 years ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install buf-compare 
SYNC missed versions from official npm registry.

Deprecated

Just use Buffer.compare(). It has been available since Node.js 0.12.


buf-compare Build Status

Node.js Buffer.compare() ponyfill

Install

$ npm install --save buf-compare

Usage

var bufCompare = require('buf-compare');

bufCompare(new Buffer('a'), new Buffer('a'));
//=> 0

bufCompare(new Buffer('a'), new Buffer('b'));
//=> -1

API

See the Buffer.compare() docs.

Related

License

MIT © Sindre Sorhus

Current Tags

  • 2.0.0                                ...           latest (8 years ago)

3 Versions

  • 2.0.0 [deprecated]           ...           8 years ago
  • 1.0.1                                ...           10 years ago
  • 1.0.0                                ...           11 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (0)
None
Dev Dependencies (1)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |