CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes45downloads
next.js36 linesDownload Raw Back to lodash
1var toArray = require('./toArray');2 3/**4 * Gets the next value on a wrapped object following the5 * [iterator protocol](https://mdn.io/iteration_protocols#iterator).6 *7 * @name next8 * @memberOf _9 * @since 4.0.010 * @category Seq11 * @returns {Object} Returns the next iterator value.12 * @example13 *14 * var wrapped = _([1, 2]);15 *16 * wrapped.next();17 * // => { 'done': false, 'value': 1 }18 *19 * wrapped.next();20 * // => { 'done': false, 'value': 2 }21 *22 * wrapped.next();23 * // => { 'done': true, 'value': undefined }24 */25function wrapperNext() {26  if (this.__values__ === undefined) {27    this.__values__ = toArray(this.value());28  }29  var done = this.__index__ >= this.__values__.length,30      value = done ? undefined : this.__values__[this.__index__++];31 32  return { 'done': done, 'value': value };33}34 35module.exports = wrapperNext;36 
basant307/AI_Governance_Project · CoolFace