Comparing version 0.1.2 to 0.2.0
{ | ||
"name": "fileq", | ||
"version": "0.1.2", | ||
"version": "0.2.0", | ||
"description": "File based FIFO queue", | ||
@@ -5,0 +5,0 @@ "author": "David Gómez Matarrodona <solzimer@gmail.com>", |
@@ -113,3 +113,4 @@ const fs = require("fs"); | ||
var len = str.length; | ||
var blocks = Math.ceil(len/this.bsize); | ||
var b = Buffer.from(str); | ||
var blocks = Math.ceil(b.length/this.bsize); | ||
@@ -120,3 +121,3 @@ // Split data into blocks | ||
var buff = Buffer.alloc(this.bsize+BPAD); | ||
buff.write(str.substring(i*this.bsize,(i+1)*this.bsize)) | ||
b.copy(buff,0,i*this.bsize,(i+1)*this.bsize); | ||
buff.writeUInt8(i<blocks-1?1:0,buff.length-1); | ||
@@ -123,0 +124,0 @@ buffers.push(buff); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16064
418