Skip to content

Instantly share code, notes, and snippets.

@roundcorners
Created October 25, 2011 09:32
Show Gist options
  • Save roundcorners/1312032 to your computer and use it in GitHub Desktop.
Save roundcorners/1312032 to your computer and use it in GitHub Desktop.
Updated iterator object
length = data.length ? data.length : count(data);
next: function() {
if (!this.hasNext()) {
return null;
}
index = index + 1;
if (data[index] !== undefined) {
return data[index];
}
return getItem(data, index);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment