MCPcopy Create free account
hub / github.com/Code-Bullet/Jump-King / iteratorFor

Function iteratorFor

libraries/p5.js:7568–7583  ·  view source on GitHub ↗
(items)

Source from the content-addressed store, hash-verified

7566
7567 // Build a destructive iterator for the value list
7568 function iteratorFor(items) {
7569 var iterator = {
7570 next: function() {
7571 var value = items.shift()
7572 return {done: value === undefined, value: value}
7573 }
7574 }
7575
7576 if (support.iterable) {
7577 iterator[Symbol.iterator] = function() {
7578 return iterator
7579 }
7580 }
7581
7582 return iterator
7583 }
7584
7585 function Headers(headers) {
7586 this.map = {}

Callers 1

p5.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected