pagoda icon indicating copy to clipboard operation
pagoda copied to clipboard

Add a `?`operator to pgscript.

Open diegoarjz opened this issue 3 years ago • 0 comments

Although useful for general scripting, its main purpose is to default missing parameters in node expressions.

For example, features in GeoJSON usually don't have the same set of parameters which makes using them unreliable.

The operator should be:

lhs ? rhs

This operator should check if the lhs symbol exists and if its conversion to a boolean is true, in which case it returns lhs. Otherwise, return rhs.

diegoarjz avatar Aug 12 '20 17:08 diegoarjz