Files
DumiFlex 26c2068671 feat(docs): one field list per node for the docs pages and the Node Info help (#256)
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).
2026-11-03 21:24:30 +01:00

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" index 2 → True
  • "yes,no,yes" index 1 → False
  • "1.5" index 0 → default (1.5 is not a bool token)