MCPcopy
hub / github.com/postcss/postcss / each

Method each

lib/container.js:56–71  ·  view source on GitHub ↗
(callback)

Source from the content-addressed store, hash-verified

54 }
55
56 each(callback) {
57 if (!this.proxyOf.nodes) return undefined
58 let iterator = this.getIterator()
59
60 let index, result
61 while (this.indexes[iterator] < this.proxyOf.nodes.length) {
62 index = this.indexes[iterator]
63 result = callback(this.proxyOf.nodes[index], index)
64 if (result === false) break
65
66 this.indexes[iterator] += 1
67 }
68
69 delete this.indexes[iterator]
70 return result
71 }
72
73 every(condition) {
74 return this.nodes.every(condition)

Callers 9

walkMethod · 0.95
walkSyncMethod · 0.80
processor.test.tsFile · 0.80
map.test.tsFile · 0.80
at-rule.test.tsFile · 0.80
postcss.test.tsFile · 0.80
container.test.tsFile · 0.80

Calls 1

getIteratorMethod · 0.95

Tested by

no test coverage detected