mirror of
https://github.com/docmost/docmost.git
synced 2026-07-14 02:36:47 +10:00
feat(base-formula): add logic functions
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
// 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",
|
||||
});
|
||||
Reference in New Issue
Block a user