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

Method object

external/.tableSearch.js:55–63  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

53 return this.uriEncodedString.split(this.grammar.rowDelimiter).map(line => line.split(this.grammar.columnDelimiter).map(cell => this.decodeCell(cell)))
54 }
55 get object() {
56 const patchObj = {}
57 if (!this.uriEncodedString) return patchObj
58 this.array.forEach(cells => {
59 const identifierCell = cells.shift()
60 patchObj[identifierCell] = cells.length > 1 ? cells : cells[0] // If a single value, collapse to a simple tuple. todo: sure about this design?
61 })
62 return patchObj
63 }
64 encodeCell(unencodedCell) {
65 return this.encoders.reduce((str, encoder) => encoder.encode(str), unencodedCell)
66 }

Callers

nothing calls this directly

Calls 2

forEachMethod · 0.80
shiftMethod · 0.80

Tested by

no test coverage detected