MCPcopy Create free account
hub / github.com/breck7/scroll / importCommand

Method importCommand

ScrollSetCLI.js:15–23  ·  view source on GitHub ↗
(filename)

Source from the content-addressed store, hash-verified

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()

Callers

nothing calls this directly

Calls 7

patchAndSaveMethod · 0.95
splitMethod · 0.80
forEachMethod · 0.80
fromCsvMethod · 0.80
fromTsvMethod · 0.80
fromDiskMethod · 0.80
readMethod · 0.45

Tested by

no test coverage detected