()
| 2349 | } |
| 2350 | } |
| 2351 | writedata() { |
| 2352 | if (this.isNode()) { |
| 2353 | (this.fs = this.fs ? this.fs : require('fs')), |
| 2354 | (this.path = this.path ? this.path : require('path')); |
| 2355 | const t = this.path.resolve(this.dataFile), |
| 2356 | s = this.path.resolve(process.cwd(), this.dataFile), |
| 2357 | e = this.fs.existsSync(t), |
| 2358 | i = !e && this.fs.existsSync(s), |
| 2359 | o = JSON.stringify(this.data); |
| 2360 | e ? this.fs.writeFileSync(t, o) : i ? this.fs.writeFileSync(s, o) : this.fs.writeFileSync(t, o); |
| 2361 | } |
| 2362 | } |
| 2363 | lodash_get(t, s, e) { |
| 2364 | const i = s.replace(/\[(\d+)\]/g, '.$1').split('.'); |
| 2365 | let o = t; |
no test coverage detected