ifpresent
.ifpresent value:{Dynamic} mapping:{Lambda} -> AnyContent copied to clipboard
Maps value to the result of mapping. This function is usually inlined:
.name::ifpresent {x: .x::uppercase}::otherwise {unnamed}Content copied to clipboard
A constant result is also valid:
.name::ifpresent {I have a name}::otherwise {I'm unnamed}Content copied to clipboard
Return
the result of mapping executed on value if value is not none, none otherwise
Parameters
value
value to check
See also
Chaining
This function is designed to be chained with other function calls:Dynamic::ifpresent mapping:{Lambda} -> AnyContent copied to clipboard