Avril 4 years ago
parent 991993b8ef
commit 82e6669462
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -1,4 +1,3 @@
/**
* An async collection / item stream.
* @param {Array} from Optional array to begin reading from.
@ -25,6 +24,12 @@ function Stage(from) {
}
};
/**
* Returns true if there are any values left in the stream, or if the stream is still open.
*/
this.hasValues = () => {
return !(base.over && base.array.length==0);
};
/**
* Take one item off then end. Function will yield if none available to produce yet.
* @return {} undefined if there is no more items to produce (`commit` was called), otherwise the next item in the stream.

Loading…
Cancel
Save