MCPcopy
hub / github.com/winjs/winjs / initData

Function initData

tests/ListViewComponents/VirtualizeContentsViewTest.ts:24–36  ·  view source on GitHub ↗
(count?, groupSize?)

Source from the content-addressed store, hash-verified

22 STRUCTURENODE_SIZE = 8;
23
24 function initData(count?, groupSize?) {
25 count = count || COUNT;
26 groupSize = groupSize || 10;
27
28 var items = [];
29 for (var i = 0; i < count; ++i) {
30 items[i] = {
31 title: "Tile" + i,
32 group: Math.floor(i / groupSize)
33 };
34 }
35 return items;
36 }
37
38 function groupKey(data) {
39 return data.group.toString();

Calls 1

floorMethod · 0.80

Tested by

no test coverage detected