🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

from

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

from - npm Package Compare versions

Comparing version

to
0.0.2

2

index.js

@@ -32,3 +32,3 @@

if(ended) return
while(!ended && !s.paused && source.call(s, i, function () {
while(!ended && !s.paused && source.call(s, i++, function () {
if(!n++ && !s.ended && !s.paused)

@@ -35,0 +35,0 @@ next()

{
"name": "from",
"version": "0.0.1",
"version": "0.0.2",
"description": "Easy way to make a Readable Stream",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -28,2 +28,19 @@ var from = require('..')

exports['inc'] = function (test) {
var fs = from(function (i) {
this.emit('data', i)
if(i >= 99)
return this.emit('end')
return true
})
spec(fs).readable().validateOnExit()
read(fs, function (err, arr) {
test.equal(arr.length, 100)
test.done()
})
}
exports['simple'] = function (test) {

@@ -40,3 +57,3 @@

.readable()
.strictPausable()
.pausable({strict: true})
.validateOnExit()

@@ -63,3 +80,3 @@

.readable()
.strictPausable()
.pausable({strict: true})
.validateOnExit()

@@ -104,3 +121,3 @@

.readable()
//.strictPausable()
.pausable({strict: false })
.validateOnExit()

@@ -127,1 +144,3 @@

}