Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 49x | import type { CardData, RecommendationData } from "../types";
 
function formatCardData(data: RecommendationData): CardData {
  return {
    package: {
      description: data.details.summary,
      display_name: data.details.title,
      icon_url: data.details.icon,
      name: data.details.name,
    },
    publisher: {
      display_name: data.details.publisher,
      name: data.details.publisher,
      validation: data.details.developer_validation,
    },
  };
}
 
export default formatCardData;
  |