| 13 | } |
| 14 | |
| 15 | importCommand(filename) { |
| 16 | const extension = filename.split(".").pop() |
| 17 | |
| 18 | if (extension === "csv") Particle.fromCsv(Disk.read(filename)).forEach(patch => this.patchAndSave(patch)) |
| 19 | |
| 20 | if (extension === "tsv") Particle.fromTsv(Disk.read(filename)).forEach(patch => this.patchAndSave(patch)) |
| 21 | |
| 22 | if (extension === "particles") Particle.fromDisk(filename).forEach(patch => this.patchAndSave(patch)) |
| 23 | } |
| 24 | |
| 25 | get searchIndex() { |
| 26 | if (!this.quickCache.searchIndex) this.quickCache.searchIndex = this.makeNameSearchIndex() |