rabin
Advanced tools
Comparing version 1.2.0 to 1.3.0
14
index.js
@@ -11,2 +11,4 @@ var stream = require('readable-stream') | ||
if (!(this instanceof Rabin)) return new Rabin(opts) | ||
if (!opts) opts = {} | ||
stream.Duplex.call(this, {objectMode: true}) | ||
this.destroyed = false | ||
@@ -23,5 +25,4 @@ this.rabinEnded = false | ||
this.push(null) | ||
this.rabinEnd() | ||
}) | ||
stream.Duplex.call(this, {objectMode: true}) | ||
} | ||
@@ -42,4 +43,5 @@ | ||
var bufs = batch.map(function (b) { | ||
self.buffers.append(b.chunk) | ||
return b.chunk | ||
var chunk = toBuffer(b.chunk) | ||
self.buffers.append(chunk) | ||
return chunk | ||
}) | ||
@@ -78,1 +80,5 @@ var lengths = [] | ||
} | ||
function toBuffer (buf) { | ||
return Buffer.isBuffer(buf) ? buf : new Buffer(buf) | ||
} |
{ | ||
"name": "rabin", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "node native bindings to a C rabin fingerprinting algorithm", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
92
17504
15
2