isScalar

tcmts.server.isScalar · #hhshpqtn · term · runs anywhere

A value SQLite compares as itself: a string, a finite number, a boolean or null.

export const isScalar = (v: unknown): boolean =>
  v === null ||
  typeof v === "string" ||
  typeof v === "boolean" ||
  (typeof v === "number" && Number.isFinite(v))

used by