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

Method javascriptTableWithHeaderRowToObjects

external/.scrollLibs.js:14487–14495  ·  view source on GitHub ↗
(dataTable)

Source from the content-addressed store, hash-verified

14485 return result
14486 }
14487 static javascriptTableWithHeaderRowToObjects(dataTable) {
14488 dataTable = dataTable.slice()
14489 const header = dataTable.shift()
14490 return dataTable.map(row => {
14491 const obj = {}
14492 header.forEach((colName, index) => (obj[colName] = row[index]))
14493 return obj
14494 })
14495 }
14496 static interweave(arrayOfArrays) {
14497 const lineCount = Math.max(...arrayOfArrays.map(arr => arr.length))
14498 const totalArrays = arrayOfArrays.length

Callers

nothing calls this directly

Calls 4

sliceMethod · 0.80
shiftMethod · 0.80
mapMethod · 0.80
forEachMethod · 0.80

Tested by

no test coverage detected