Switch-style matching on an input value.
Pass [label(s), output] tuples followed by a fallback. Labels can be single values or arrays for multi-match:
[label(s), output]
expr.match( expr.get("type"), ["residential", "#0f0"], [["commercial", "retail"], "#00f"], "#888",) Copy
expr.match( expr.get("type"), ["residential", "#0f0"], [["commercial", "retail"], "#00f"], "#888",)
Switch-style matching on an input value.
Pass
[label(s), output]tuples followed by a fallback. Labels can be single values or arrays for multi-match: