mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-29 07:04:09 +08:00
8 lines
237 B
TypeScript
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()})`;
|
|
}
|