MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / add

Method add

lib/data/table.js:12–22  ·  view source on GitHub ↗

@param {Array<*>} array

(array)

Source from the content-addressed store, hash-verified

10
11 /** @param {Array<*>} array */
12 add(array) {
13 if (array.length !== this.array.length) throw new Error(`There is too many elements in given data array. Please provide data in this format: ${this.array}`)
14 const tempObj = {}
15 let arrayCounter = 0
16 this.array.forEach(elem => {
17 tempObj[elem] = array[arrayCounter]
18 tempObj.toString = () => JSON.stringify(tempObj)
19 arrayCounter++
20 })
21 this.rows.push({ skip: false, data: tempObj })
22 }
23
24 /** @param {Array<*>} array */
25 xadd(array) {

Callers 15

publishSiteFunction · 0.45
releaseFunction · 0.45
sessionFunction · 0.45
finalizeFunction · 0.45
withinFunction · 0.45
finalizeFunction · 0.45
finishHelpersFunction · 0.45
hopeThatFunction · 0.45
tryBlockFunction · 0.45
retryToFunction · 0.45
tryToFunction · 0.45
onStepAfterFunction · 0.45

Calls 1

pushMethod · 0.80

Tested by 1

testFunction · 0.36