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