This commit is contained in:
2026-09-28 23:15:47 +05:30
commit 605c6a2e58
41 changed files with 4299 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
/** Bill tokens are UUID v4 from the tablet. */
export function isUuid(value: string): boolean {
return UUID_RE.test(value);
}
/**
* Row ids are UUID v4, except shop_settings which the tablet seeds as "default".
* CHAR(36) and a tight charset. Values are still bound as parameters.
*/
const ROW_ID_RE = /^[0-9a-zA-Z_-]{1,36}$/;
export function isRowId(value: string): boolean {
return ROW_ID_RE.test(value);
}