Files

8 lines
237 B
TypeScript

import { stock } from "./inventory.ts";
export function summary(): string {
const parts: string[] = [];
for (const [name, qty] of stock.items) parts.push(`${name}=${qty}`);
return parts.join(", ") + ` (total ${stock.count()})`;
}