import pretty from 'pretty'; import _ from 'lodash'; const showBorders = false; const showBackground = true; export function createAveryPresta61520Layouts(svgs: string[]): string[] { const chunks = _.chunk(svgs, 8); return chunks.map(createAveryPresta61520Layout); } const borders = ` `; const background = ``; function createAveryPresta61520Layout(svgs: string[]): string { return pretty(` ${showBackground ? background : ''} ${showBorders ? borders : ''} ${svgs[0] ?? ''} ${svgs[1] ?? ''} ${svgs[2] ?? ''} ${svgs[3] ?? ''} ${svgs[4] ?? ''} ${svgs[5] ?? ''} ${svgs[6] ?? ''} ${svgs[7] ?? ''} `); }