Firebase Update

This commit is contained in:
Lukas Nowy
2018-12-22 23:30:39 +01:00
parent befb44764d
commit acffe619b3
11523 changed files with 1614327 additions and 930246 deletions

View File

@ -0,0 +1,22 @@
'use strict';
var async = require('async');
var ended = require('is-stream-ended');
module.exports = function (array, stream, callback) {
var arr = [].slice.call(array);
async.whilst(
function () {
return !ended(stream) && arr.length > 0;
},
function (next) {
stream.push(arr.shift());
setImmediate(next);
},
function () {
callback(ended(stream));
});
};