You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Forwards input to one of the user-defined output ports, depending of the current position of the switcher. Bounces input when the position doesn't match any of the outputs.
import{connect}from"flowcode";import{createSwitcher}from"flowcode-flow";constswitcher=createSwitcher(["foo","bar"]);connect(switcher.o.foo,console.log);switcher.i.all({d_val: "a",st_pos: "foo"});// logs: "a"