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