MCPcopy Index your code
hub / github.com/smallfawn/QLScriptPublic / setdata

Method setdata

jlld.js:313–328  ·  view source on GitHub ↗
(t, s)

Source from the content-addressed store, hash-verified

311 return s;
312 }
313 setdata(t, s) {
314 let e = !1;
315 if (/^@/.test(s)) {
316 const [, i, o] = /^@(.*?)\.(.*?)$/.exec(s),
317 h = this.getval(i),
318 a = i ? ("null" === h ? null : h || "{}") : "{}";
319 try {
320 const s = JSON.parse(a);
321 this.lodash_set(s, o, t), (e = this.setval(JSON.stringify(s), i));
322 } catch (s) {
323 const h = {};
324 this.lodash_set(h, o, t), (e = this.setval(JSON.stringify(h), i));
325 }
326 } else e = this.setval(t, s);
327 return e;
328 }
329 getval(t) {
330 if (this.isSurge() || this.isLoon()) {
331 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