| 937 | } |
| 938 | |
| 939 | writedata() { |
| 940 | if (this.isNode()) { |
| 941 | this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); |
| 942 | const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), |
| 943 | s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); |
| 944 | s ? this.fs.writeFileSync(t, r) : i ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) |
| 945 | } |
| 946 | } |
| 947 | |
| 948 | lodash_get(t, e, s) { |
| 949 | const i = e.replace(/\[(\d+)\]/g, ".$1").split("."); |