MCPcopy
hub / github.com/baidu/amis / forEach

Method forEach

packages/office-viewer/src/util/LinkedMap.ts:133–150  ·  view source on GitHub ↗
(
    callbackfn: (value: V, key: K, map: LinkedMap<K, V>) => void,
    thisArg?: any
  )

Source from the content-addressed store, hash-verified

131 }
132
133 forEach(
134 callbackfn: (value: V, key: K, map: LinkedMap<K, V>) => void,
135 thisArg?: any
136 ): void {
137 const state = this._state;
138 let current = this._head;
139 while (current) {
140 if (thisArg) {
141 callbackfn.bind(thisArg)(current.value, current.key, this);
142 } else {
143 callbackfn(current.value, current.key, this);
144 }
145 if (this._state !== state) {
146 throw new Error(`LinkedMap got modified during iteration.`);
147 }
148 current = current.next;
149 }
150 }
151
152 keys(): IterableIterator<K> {
153 const map = this;

Callers 15

toJSONMethod · 0.95
fis-conf.jsFile · 0.80
rollup.config.jsFile · 0.80
callAnonymousFunctionMethod · 0.80
objectMethod · 0.80
callAnonymousFunctionMethod · 0.80
createObjectFunction · 0.80
bulkRegisterFunctionDocFunction · 0.80
mainFunction · 0.80
rollup.config.jsFile · 0.80
schemaExtend.tsFile · 0.80

Calls

no outgoing calls

Tested by 4

formatStyleObjectFunction · 0.64
replaceReactAriaIdsFunction · 0.64
formatStyleObjectFunction · 0.64
postMessageMethod · 0.64