Skip to content

#is

Matches the value against a type, array pattern, object pattern, or scalar literal.

#is(pattern)
Category Pattern matchingValid in Match case
Name Type Description
pattern pattern A type (object, array, string, integer, decimal, boolean, null), an array or object pattern, or a literal.
{ "#is(object)": "'Found an object'" }
{ "#is({ 'name': @name, 'values': [@firstValue, _] })": "#append('Name is ', @name)" }

#match · #given · #default