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

Function chunkArray

lib/utils.js:134–142  ·  view source on GitHub ↗
(arr, chunk)

Source from the content-addressed store, hash-verified

132}
133
134export const chunkArray = function (arr, chunk) {
135 let i
136 let j
137 const tmp = []
138 for (i = 0, j = arr.length; i < j; i += chunk) {
139 tmp.push(arr.slice(i, i + chunk))
140 }
141 return tmp
142}
143
144export const clearString = function (str) {
145 if (!str) return ''

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected