MCPcopy Create free account
hub / github.com/Semporia/Scripts / writedata

Method writedata

jd_superMarket.js:2222–2228  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2220 }
2221
2222 writedata() {
2223 if (this.isNode()) {
2224 this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path");
2225 const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e), r = JSON.stringify(this.data);
2226 s ? this.fs.writeFileSync(t, r) : i ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r)
2227 }
2228 }
2229
2230 lodash_get(t, e, s) {
2231 const i = e.replace(/\[(\d+)\]/g, ".$1").split(".");

Callers 1

setvalMethod · 0.45

Calls 1

isNodeMethod · 0.45

Tested by

no test coverage detected