import type { NutritionDetailType } from '../types' ; export function calculateAmount ( nutrition ) { return nutrition . unit . includes ( 'lessthan' ) ? `less than ${ nutrition . value }${ nutrition . unit . split ( 'lessthan' ) [ 1 ] }` : `${ nutrition . value }${ nutrition . unit }` ; }