Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function createGroups(): IExampleGroup[] {
let offset = 0;
const groups: IExampleGroup[] = [];
for (let i = 0; i < 20; i++) {
const items = createDocumentItems(50 + Math.ceil(Math.random() * 6) * 50, offset);
offset += items.length;
groups.push(createGroup(items, 'document', i));
}
return groups;
}
function createGroups(): IExampleGroup[] {
let offset = 0;
const groups: IExampleGroup[] = [];
for (let i = 0; i < 20; i++) {
const items = createMediaItems(50 + Math.ceil(Math.random() * 6) * 50, offset);
offset += items.length;
groups.push(createGroup(items, 'media', i));
}
return groups;
}