Fix sync with dumb relays

This commit is contained in:
Jon Staab
2024-10-17 10:41:30 -07:00
parent c0b66557c4
commit eec1552f5d
2 changed files with 10 additions and 4 deletions
+8
View File
@@ -27,6 +27,14 @@ export const inc = (x: number | Nil) => (x || 0) + 1
export const dec = (x: number | Nil) => (x || 0) - 1
export const lt = (x: number | Nil, y: number | Nil) => (x || 0) < (y || 0)
export const lte = (x: number | Nil, y: number | Nil) => (x || 0) <= (y || 0)
export const gt = (x: number | Nil, y: number | Nil) => (x || 0) > (y || 0)
export const gte = (x: number | Nil, y: number | Nil) => (x || 0) >= (y || 0)
export const max = (xs: number[]) => xs.reduce((a, b) => Math.max(a, b), 0)
export const min = (xs: number[]) => xs.reduce((a, b) => Math.min(a, b), 0)