00001 var toArray = require('./toArray'); 00002 00025 function wrapperNext() { 00026 if (this.__values__ === undefined) { 00027 this.__values__ = toArray(this.value()); 00028 } 00029 var done = this.__index__ >= this.__values__.length, 00030 value = done ? undefined : this.__values__[this.__index__++]; 00031 00032 return { 'done': done, 'value': value }; 00033 } 00034 00035 module.exports = wrapperNext;