mirror of
https://github.com/docmost/docmost.git
synced 2026-07-15 15:46:43 +10:00
13 lines
386 B
TypeScript
13 lines
386 B
TypeScript
// packages/base-formula/src/functions/logic.ts
|
|
import { register } from "./registry";
|
|
|
|
register({
|
|
name: "empty",
|
|
arity: { min: 1, max: 1 },
|
|
paramTypes: "any",
|
|
returnType: "boolean",
|
|
eval: ([v]) => v == null || v === "" || (typeof v === "object" && v !== null && "__err" in v),
|
|
doc: "Returns true if the value is null or empty string or an error.",
|
|
category: "logic",
|
|
});
|