Files
DumiFlex-ComfyUI-Wildcard-P…/docs/help/WP_VarToBool.md
T
Dumitru Picalau 0368201dc8 docs: rewrite the user docs in plain words (#94)
Every built-in docs page, node help panel and the README is shorter and
plainer, with new screenshots of the current nodes. The AI assistant page
is split into short pages, a new How to group covers variations, making
picks agree, keeping something steady, sharing and troubleshooting, and
wildcard import has its own page. The warnings reference uses WP Debug's
labels, the AI image descriptions match the new screenshots, and the
release notes are rewritten in plain words. Local models need at least
16k of context; 32k is recommended.
2026-10-22 06:26:44 +02:00

829 B

WP Var → Bool

Reads a $variable from the upstream Context and emits a BOOLEAN.

Inputs

Name Type Notes
context context Required. From a WP Context.
var_name dropdown Pick from upstream $vars.
index INT Which bool token in the var's value.
default BOOLEAN Returned when no Nth match.

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)