MCPcopy Create free account
hub / github.com/microsoft/SandDance / createArray

Function createArray

docs/app/js/sanddance-app.js:23251–23255  ·  view source on GitHub ↗
(size, getItem)

Source from the content-addressed store, hash-verified

23249 return array[index];
23250}
23251function createArray(size, getItem) {
23252 var array = [];
23253 for(var i = 0; i < size; i++)array.push(getItem(i));
23254 return array;
23255}
23256function toMatrix(items, columnCount) {
23257 return items.reduce(function(rows, currentValue, index) {
23258 if (index % columnCount === 0) rows.push([

Callers

nothing calls this directly

Calls 1

getItemFunction · 0.85

Tested by

no test coverage detected