feat(housekeeping): deliver economy vertical
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import type { EconomyQueryData, NormalizedEconomyQueryInput } from "./catalog";
|
||||
|
||||
export function serializeEconomyAmount(
|
||||
value: string | number,
|
||||
currency: string,
|
||||
): string {
|
||||
const raw =
|
||||
typeof value === "number" && Number.isFinite(value)
|
||||
? value.toFixed(2)
|
||||
: String(value).trim();
|
||||
return `${currency.normalize("NFC").trim().toUpperCase().slice(0, 8)} ${raw}`;
|
||||
}
|
||||
|
||||
export async function loadEconomyCommerceQuery(
|
||||
input: NormalizedEconomyQueryInput,
|
||||
): Promise<EconomyQueryData> {
|
||||
const { loadEconomyDatabaseQuery } = await import("./economy-production");
|
||||
return loadEconomyDatabaseQuery(input);
|
||||
}
|
||||
Reference in New Issue
Block a user