#is
Matches the value against a type, array pattern, object pattern, or scalar literal.
#is(pattern)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
pattern |
pattern |
A type (object, array, string, integer, decimal, boolean, null), an array or object pattern, or a literal. |
Examples
Section titled “Examples”Type pattern
Section titled “Type pattern”{ "#is(object)": "'Found an object'" }Object pattern with bindings
Section titled “Object pattern with bindings”{ "#is({ 'name': @name, 'values': [@firstValue, _] })": "#append('Name is ', @name)" }