Comparing version 0.2.2 to 0.2.3
@@ -49,3 +49,3 @@ 'use strict'; | ||
* - `reads` = number of successful reads from the stream | ||
* - `size` = total number of bytes read from the stream | ||
* - `length` = total length for all the data reads from the stream | ||
* - `duration` = number of milliseconds consumed by the method | ||
@@ -70,3 +70,3 @@ * | ||
var self = this, reads = 0, size = 0, start = Date.now(), | ||
var self = this, reads = 0, length = 0, start = Date.now(), | ||
index = 0, cbTime, ready, waiting, stop; | ||
@@ -115,3 +115,3 @@ | ||
data.push(page); | ||
size += page.length; | ||
length += page.length; | ||
reads++; | ||
@@ -145,3 +145,2 @@ } | ||
}); | ||
} else { | ||
@@ -158,3 +157,3 @@ waiting = false; | ||
reads: reads, | ||
size: size, | ||
length: length, | ||
duration: Date.now() - start | ||
@@ -161,0 +160,0 @@ }); |
{ | ||
"name": "spex", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "Specialized Promise Extensions", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -147,3 +147,3 @@ 'use strict'; | ||
expect(obj.reads >= obj.calls).toBe(true); | ||
expect(obj.size > 0).toBe(true); | ||
expect(obj.length > 0).toBe(true); | ||
expect(obj.duration >= 0).toBe(true); | ||
@@ -150,0 +150,0 @@ } |
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
61592