| 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; |