| 141 | } |
| 142 | } |
| 143 | writedata() { |
| 144 | if (this.isNode()) { |
| 145 | ;(this.fs = this.fs ? this.fs : require('fs')), (this.path = this.path ? this.path : require('path')) |
| 146 | const t = this.path.resolve(this.dataFile), |
| 147 | e = this.path.resolve(process.cwd(), this.dataFile), |
| 148 | s = this.fs.existsSync(t), |
| 149 | a = !s && this.fs.existsSync(e), |
| 150 | r = JSON.stringify(this.data) |
| 151 | s ? this.fs.writeFileSync(t, r) : a ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) |
| 152 | } |
| 153 | } |
| 154 | lodash_get(t, e, s) { |
| 155 | const a = e.replace(/\[(\d+)\]/g, '.$1').split('.') |
| 156 | let r = t |