MCPcopy Create free account
hub / github.com/Toulu-debug/enen / setdata

Method setdata

iOS_Cookie.js:178–191  ·  view source on GitHub ↗
(t, e)

Source from the content-addressed store, hash-verified

176 }
177
178 setdata(t, e) {
179 let s = !1;
180 if (/^@/.test(e)) {
181 const [, i, r] = /^@(.*?)\.(.*?)$/.exec(e), o = this.getval(i), h = i ? "null" === o ? null : o || "{}" : "{}";
182 try {
183 const e = JSON.parse(h);
184 this.lodash_set(e, r, t), s = this.setval(JSON.stringify(e), i)
185 } catch (e) {
186 const o = {};
187 this.lodash_set(o, r, t), s = this.setval(JSON.stringify(o), i)
188 }
189 } else s = this.setval(t, e);
190 return s
191 }
192
193 getval(t) {
194 return this.isSurge() || this.isLoon() ? $persistentStore.read(t) : this.isQuanX() ? $prefs.valueForKey(t) : this.isNode() ? (this.data = this.loaddata(), this.data[t]) : this.data && this.data[t] || null

Callers 1

setjsonMethod · 0.45

Calls 3

getvalMethod · 0.45
lodash_setMethod · 0.45
setvalMethod · 0.45

Tested by

no test coverage detected