feat(base-formula): add logic functions

This commit is contained in:
Philipinho
2026-04-24 00:02:15 +01:00
parent e9e903abe9
commit 22716f3df9
@@ -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",
});