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

Function get

ElectronJS/src/js/vue.global.js:1037–1062  ·  view source on GitHub ↗
(target, key, isReadonly = false, isShallow = false)

Source from the content-addressed store, hash-verified

1035 const toShallow = (value) => value;
1036 const getProto = (v) => Reflect.getPrototypeOf(v);
1037 function get(target, key, isReadonly = false, isShallow = false) {
1038 // #1772: readonly(reactive(Map)) should return readonly + reactive version
1039 // of the value
1040 target = target["__v_raw" /* ReactiveFlags.RAW */];
1041 const rawTarget = toRaw(target);
1042 const rawKey = toRaw(key);
1043 if (!isReadonly) {
1044 if (key !== rawKey) {
1045 track(rawTarget, "get" /* TrackOpTypes.GET */, key);
1046 }
1047 track(rawTarget, "get" /* TrackOpTypes.GET */, rawKey);
1048 }
1049 const { has } = getProto(rawTarget);
1050 const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;
1051 if (has.call(rawTarget, key)) {
1052 return wrap(target.get(key));
1053 }
1054 else if (has.call(rawTarget, rawKey)) {
1055 return wrap(target.get(rawKey));
1056 }
1057 else if (target !== rawTarget) {
1058 // #3602 readonly(reactive(Map))
1059 // ensure that the nested reactive `Map` can do tracking for itself
1060 target.get(key);
1061 }
1062 }
1063 function has(key, isReadonly = false) {
1064 const target = this["__v_raw" /* ReactiveFlags.RAW */];
1065 const rawTarget = toRaw(target);

Callers

nothing calls this directly

Calls 10

toRawFunction · 0.85
trackFunction · 0.85
getProtoFunction · 0.85
hasSetupBindingFunction · 0.85
markAttrsAccessedFunction · 0.85
isStringFunction · 0.85
isReservedPrefixFunction · 0.85
hasOwnFunction · 0.70
warnFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected