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

Method writedata

ruilanCar.js:203–214  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

201 }
202 }
203 writedata() {
204 if (this.isNode()) {
205 this.fs = this.fs ? this.fs : require("fs");
206 this.path = this.path ? this.path : require("path");
207 const t = this.path.resolve(this.dataFile),
208 s = this.path.resolve(process.cwd(), this.dataFile),
209 e = this.fs.existsSync(t),
210 i = !e && this.fs.existsSync(s),
211 o = JSON.stringify(this.data);
212 e ? this.writeFileSync(t, o) : i ? this.fs.writeFileSync(s, o) : this.fs.writeFileSync(t, o);
213 }
214 }
215 lodash_get(t, s, e) {
216 const i = s.replace(/\[(\d+)\]/g, ".$1").split(".");
217 let o = t;

Callers 1

setvalMethod · 0.45

Calls 1

isNodeMethod · 0.45

Tested by

no test coverage detected