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

Method writedata

jlld.js:265–276  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

263 }
264 }
265 writedata() {
266 if (this.isNode()) {
267 this.fs = this.fs ? this.fs : require("fs");
268 this.path = this.path ? this.path : require("path");
269 const t = this.path.resolve(this.dataFile),
270 s = this.path.resolve(process.cwd(), this.dataFile),
271 e = this.fs.existsSync(t),
272 i = !e && this.fs.existsSync(s),
273 o = JSON.stringify(this.data);
274 e ? this.writeFileSync(t, o) : i ? this.fs.writeFileSync(s, o) : this.fs.writeFileSync(t, o);
275 }
276 }
277 lodash_get(t, s, e) {
278 const i = s.replace(/\[(\d+)\]/g, ".$1").split(".");
279 let o = t;

Callers 1

setvalMethod · 0.45

Calls 1

isNodeMethod · 0.45

Tested by

no test coverage detected