Skip to content

hollowdoor/streamall

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

streamall

Install

npm install streamall

Usage

var fs = require('fs'),
    streamall = require('streamall');

streamall([
    fs.createReadStream('source.js'),
    fs.createWriteStream('dest.js')
]).then(function(){
    console.log('success');
}, function(e){
    console.log(e);
});

streamall.isStreamList

Check an array to see if all of the values are streams.

If there is a value in the array that is not a stream, or the array is empty return false.

if(streamall.isStreamList(array)){
    //true
}else{
    //false
}

About

streamall accepts an array of streams, and returns a promise.

It sets all the stream error events to promise reject, and resolves on the the finish event of the last stream.

Should work well with coroutines that accept yielded promises, and general thenables.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published