Skip to content
OpenNodeFlow.DocsOpen beta ↗
Agent guide ↗
Docs/Library asset reference

Switch Text Cases

Match a text socket against up to four configured strings case1, case2, case3 and case4. Unconfigured cases are inactive; empty text is a valid configured case. caseSensitive defaults true; false applies JavaScript Unicode toLowerCase witho

23 Oct 2026 · 3 min read
Markdown ↗JSON ↗

Switch Text Cases#

Match a text socket against up to four configured strings case1, case2, case3 and case4. Unconfigured cases are inactive; empty text is a valid configured case. caseSensitive defaults true; false applies JavaScript Unicode toLowerCase without locale collation/normalization. Duplicates after normalization fail before any route emits. Exactly one case1..case4 or otherwise control emits; next never emits. index is 1..4 on match and 0 otherwise, with matched flag and unchanged value. Example: case2="ready", value="ready" → case2,index 2. All cases absent selects otherwise. Max 200000 UTF-16 code units per input/case.

Pure transformation: no I/O, secrets, logging or persistent state. No account setup is required. Errors throw to the error control path. Runtime validates inputs, configuration and returned data against the pinned contracts. Configuration defaults stated here are also implemented in code. Data wires alone do not choose execution paths. Existing JSON Value/List sockets are explicit dynamic JSON boundaries, not provider entity schemas.

Inputs: value (string, required). Outputs: matched (boolean, required), index (number, required), value (string, required).

Unless a stricter limit is stated, JSON processing accepts at most 1 MiB UTF-8, 20000 values, depth 64, 10000 array items and 200000 UTF-16 code units per string/key. Invalid values fail without echoing payloads. JSON cannot transport undefined, cycles, BigInt, NaN or Infinity. Primitive text operations use the same 200000 code-unit bound. All type/executor dependencies are exact immutable pins; reading Latest help never upgrades graph instances.

Audited socket contract (21 October 2026)#

Inputs:

  • value: string; required.

Outputs:

  • matched: boolean; required.
  • index: number; required.
  • value: string; required.

Configuration:

  • case1: string; no automatic default
  • case2: string; no automatic default
  • case3: string; no automatic default
  • case4: string; no automatic default
  • caseSensitive: boolean; default true

Known provider records and list elements have structural schemas. Explicit dynamic payloads, selected query results and provider extensions retain the recursive JSON Value vocabulary; they do not imply a known provider entity. Null is distinct from omission. Runtime validates the exact selected immutable type version; reading newer documentation never repins existing graphs. This audit used synthetic fixtures/local mocks and does not establish live provider authorization or delivery.

Catalog identity#

FieldValue
Source keylogic.switch.text
Kindnode
Familylogic
PackSee library discovery

Integration guide · Browse the catalog

Inputs#

Socket IDLabelTypeRequiredMeaning
execExeccontrolNo
valueValuestringYes

Outputs#

Socket IDLabelTypeRequiredMeaning
nextNextcontrolNo
case1Case1controlNo
case2Case2controlNo
case3Case3controlNo
case4Case4controlNo
otherwiseOtherwisecontrolNo
matchedMatchedbooleanYes
indexIndexnumberYes
valueValuestringYes
errorErrorcontrolNo

Configuration schema#

json
{
  "type": "object",
  "properties": {
    "case1": {
      "type": "string",
      "maxLength": 200000
    },
    "case2": {
      "type": "string",
      "maxLength": 200000
    },
    "case3": {
      "type": "string",
      "maxLength": 200000
    },
    "case4": {
      "type": "string",
      "maxLength": 200000
    },
    "caseSensitive": {
      "type": "boolean",
      "default": true
    }
  },
  "additionalProperties": false
}

Source and installed versions#

This reference describes the maintained source catalog snapshot, not a live export of your installation. Published definitions use immutable versions; installed graphs retain their exact pins. Discover and read the installed definition and selected version before wiring it. See versioning, connections and integration setup.

Source provenance

Reviewed against maintained source and topic documentation on 23 October 2026. This is a source snapshot; installed versions and provider access may differ.

  • ../OpenNodeFlow-Library/work/catalog-all.mjs
  • ../OpenNodeFlow-Library/work/azure-pack-consolidation-20261022/catalog-policy.mjs
  • ../OpenNodeFlow-Library/work/developer-packs-20261022/catalog.mjs
  • shared/seed.ts
  • shared/storage-library.ts
  • shared/variable-library.ts
  • shared/control-flow.ts
  • shared/remote-routes.ts
  • server/runtime-library.ts
  • shared/error-library.ts
  • shared/storage-model.ts
  • shared/builtin-documentation.ts
Type to search the documentation.
↑ ↓ to navigate · Enter to openAgent map ↗