|
|
|
@ -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. |
|
|
|
|