Files
scriptc/benchmarks/builds/inventory-report/validate.ts
T
Chris Tate 0845c7ff56 Make native installs portable and smaller (#599)
* Make native installs portable and smaller

- Support glibc 2.34 with portable compiler binaries and static LLVM helpers.
- Bundle the host runtime and discover optional cross-target packs from project dependencies.
- Add application build benchmarks covering latency, executable size, and memory.

* Keep bootstrap tools available in Sandbox validation

- Isolate Zig for native compiler bootstrap and glibc entropy contracts.
- Preserve the existing toolchain scope for cache and corpus tests.

* Fix portable compiler bootstrap linking

- Keep native support objects compatible with the destination host linker.
- Resolve installed targets using the host declared by the toolchain manifest.
2026-10-01 10:46:16 -05:00

7 lines
315 B
TypeScript

import type { Product } from "./types.ts";
export function valid(product: Product): boolean {
return product.sku.length > 0 && product.category.length > 0 && product.name.length > 0 &&
Number.isInteger(product.quantity) && product.quantity >= 0 &&
Number.isInteger(product.price) && product.price >= 0;
}