import { convertCard } from "./convert-card" ; import { IRow , ITemplatizedRow } from "./types" ; param { IRow } row export function convertRow ( row ) { return row . cards . reduce ( convertToTemplatizedCard , { assets : [ ] , cards : [ ] } ) ; } function convertToTemplatizedCard ( acc , card ) { const result = convertCard ( card ) ; acc . assets = acc . assets . concat ( result . assets ) ; acc . cards . push ( result . card ) ; return acc ; }