Node.js `Buffer.compare()` ponyfill
$ npm install buf-compare
Just use Buffer.compare(). It has been available since Node.js 0.12.
Node.js
Buffer.compare()ponyfill
$ npm install --save buf-compare
var bufCompare = require('buf-compare');
bufCompare(new Buffer('a'), new Buffer('a'));
//=> 0
bufCompare(new Buffer('a'), new Buffer('b'));
//=> -1
See the Buffer.compare() docs.
buffer.equals() ponyfillbuffer.indexOf() ponyfillMIT © Sindre Sorhus
© 2010 - cnpmjs.org x YWFE | Home | YWFE