Determines whether an order status is New, used to gate backoffice workflows on newly created orders.
export function isOrderNew(status: OrderStatus): boolean {
return match(status)
.with("New", () => true)
.otherwise(() => false);
}
See the full source, get the GitHub permalink, and search 40K more like it.
Get a free API key