MCPcopy
hub / github.com/NaiboWang/EasySpider / createForEach

Function createForEach

ElectronJS/src/js/vue.global.js:1148–1162  ·  view source on GitHub ↗
(isReadonly, isShallow)

Source from the content-addressed store, hash-verified

1146 return result;
1147 }
1148 function createForEach(isReadonly, isShallow) {
1149 return function forEach(callback, thisArg) {
1150 const observed = this;
1151 const target = observed["__v_raw" /* ReactiveFlags.RAW */];
1152 const rawTarget = toRaw(target);
1153 const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;
1154 !isReadonly && track(rawTarget, "iterate" /* TrackOpTypes.ITERATE */, ITERATE_KEY);
1155 return target.forEach((value, key) => {
1156 // important: make sure the callback is
1157 // 1. invoked with the reactive map as `this` and 3rd arg
1158 // 2. the value received should be a corresponding reactive/readonly.
1159 return callback.call(thisArg, wrap(value), wrap(key), observed);
1160 });
1161 };
1162 }
1163 function createIterableMethod(method, isReadonly, isShallow) {
1164 return function (...args) {
1165 const target = this["__v_raw" /* ReactiveFlags.RAW */];

Callers 1

createInstrumentationsFunction · 0.85

Calls 2

toRawFunction · 0.85
trackFunction · 0.85

Tested by

no test coverage detected