use buffer-equals
This commit is contained in:
parent
c50d510aea
commit
28372f0cd7
3 changed files with 8 additions and 17 deletions
|
@ -167,16 +167,6 @@ function varIntBuffer (i) {
|
|||
return buffer
|
||||
}
|
||||
|
||||
function equal (a, b) {
|
||||
if (a.length !== b.length) return false
|
||||
|
||||
for (var i = 0; i < a.length; ++i) {
|
||||
if (a[i] !== b[i]) return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
function reverse (buffer) {
|
||||
var buffer2 = new Buffer(buffer)
|
||||
Array.prototype.reverse.call(buffer2)
|
||||
|
@ -184,7 +174,7 @@ function reverse (buffer) {
|
|||
}
|
||||
|
||||
module.exports = {
|
||||
equal: equal,
|
||||
equal: require('buffer-equals'),
|
||||
pushDataSize: pushDataSize,
|
||||
readPushDataInt: readPushDataInt,
|
||||
readUInt64LE: readUInt64LE,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue