MCPcopy
hub / github.com/JakeChampion/fetch / iteratorFor

Function iteratorFor

fetch.js:69–84  ·  view source on GitHub ↗
(items)

Source from the content-addressed store, hash-verified

67
68// Build a destructive iterator for the value list
69function iteratorFor(items) {
70 var iterator = {
71 next: function() {
72 var value = items.shift()
73 return {done: value === undefined, value: value}
74 }
75 }
76
77 if (support.iterable) {
78 iterator[Symbol.iterator] = function() {
79 return iterator
80 }
81 }
82
83 return iterator
84}
85
86export function Headers(headers) {
87 this.map = {}

Callers 1

fetch.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…