Debian Codegraph @

doc/_includes/examples/computed-fields.jsonnet

raw
1 local Margarita(salted) = {
2 ingredients: [
3 { kind: 'Tequila Blanco', qty: 2 },
4 { kind: 'Lime', qty: 1 },
5 { kind: 'Cointreau', qty: 1 },
6 ],
7 [if salted then 'garnish']: 'Salt',
8 };
9 {
10 Margarita: Margarita(true),
11 'Margarita Unsalted': Margarita(false),
12 }