Each WP node's fields live once in src/manager/docs/node-fields.ts. The docs pages draw them with DocFields, and pnpm docs:help writes them into docs/help/WP_*.md. Tests fail when a node socket has no field or a field names a socket that is gone (tests/fixtures/node-sockets.json, written by scripts/dump_node_sockets.py).
1.1 KiB
1.1 KiB
WP Var → Bool
Reads a $variable from the upstream Context and emits a BOOLEAN.
On the node
- context (in)
context: The Context that holds the $variable. - var_name
variable: The $variable to read. The list shows every variable the wired Context has. - index
INT: Which yes/no word to use when there are several: 0 is the first, 1 the second. Other words don't count. - default
BOOLEAN: Used when the variable is missing or has no yes/no word. The node never stops the run; it uses this instead. - value (out)
BOOLEAN: True or false, for any BOOLEAN input: a switch node, a toggle and so on.
Parsing rule
Splits the value on spaces, commas, semicolons, pipes and slashes, and checks each word:
- Truthy:
true,yes,on,1(case-insensitive) - Falsy:
false,no,off,0(case-insensitive)
Tokens that match neither (e.g. "1.5", "enabled") are skipped and don't count for the index.
"true false true"index2→True"yes,no,yes"index1→False"1.5"index0→default(1.5 is not a bool token)