import { Sku } from '@commercelayer/sdk' ; const getSkus = ( skus , sortBy ) : Record < string , any > => { const obj = { } ; sortBy . forEach ( ( sku ) => { skus . forEach ( ( o ) => { if ( o ?. code === sku ) obj [ o . code ] = o ; } ) ; } ) ; return obj ; } ; export default getSkus ;