MCPcopy Create free account
hub / github.com/smallfawn/QLScriptPublic / setdata

Method setdata

ruilanCar.js:251–266  ·  view source on GitHub ↗
(t, s)

Source from the content-addressed store, hash-verified

249 return s;
250 }
251 setdata(t, s) {
252 let e = !1;
253 if (/^@/.test(s)) {
254 const [, i, o] = /^@(.*?)\.(.*?)$/.exec(s),
255 h = this.getval(i),
256 a = i ? ("null" === h ? null : h || "{}") : "{}";
257 try {
258 const s = JSON.parse(a);
259 this.lodash_set(s, o, t), (e = this.setval(JSON.stringify(s), i));
260 } catch (s) {
261 const h = {};
262 this.lodash_set(h, o, t), (e = this.setval(JSON.stringify(h), i));
263 }
264 } else e = this.setval(t, s);
265 return e;
266 }
267 getval(t) {
268 if (this.isSurge() || this.isLoon()) {
269 return $persistentStore.read(t);

Callers

nothing calls this directly

Calls 3

getvalMethod · 0.45
lodash_setMethod · 0.45
setvalMethod · 0.45

Tested by

no test coverage detected