You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Per #25, implement the Sprig functions for Bartholomew. Rather than file an issue for each function, I figured I'd break these down into small batches. (Note: I am not entirely sure all of the functions can be done with the same syntax. I am no pro in writing the Handlebars functions.)
empty TEST if TEST is "empty", return boolean true, otherwise return false
all_empty A B C returns boolean true if all of the varargs are empty (OPTIONAL. Not sure if we need)
all A B C returns boolean true if all of the varargs are non-empty (OPTIONAL. Not sure if we need)
any A B C returns boolean true if any of the varargs are non-empty (OPTIONAL. Not sure if we need)
coalesce LIST return the first non-empty item in the list. Extra good: if we can do Sprig's coalesce A B C.... with varargs, returning the first non-empty arg
ternary TRUE_VAL FALSE_VAL TEST If TEST is true, return TRUE_VAL, otherwise return FALSE_VAL
The text was updated successfully, but these errors were encountered:
Per #25, implement the Sprig functions for Bartholomew. Rather than file an issue for each function, I figured I'd break these down into small batches. (Note: I am not entirely sure all of the functions can be done with the same syntax. I am no pro in writing the Handlebars functions.)
default DEFAULT_VALUE TEST
If TEST is not truthy, return the DEFAULT_VALUE. https://masterminds.github.io/sprig/defaults.htmlempty TEST
if TEST is "empty", return boolean true, otherwise return falseall_empty A B C
returns boolean true if all of the varargs are empty (OPTIONAL. Not sure if we need)all A B C
returns boolean true if all of the varargs are non-empty (OPTIONAL. Not sure if we need)any A B C
returns boolean true if any of the varargs are non-empty (OPTIONAL. Not sure if we need)coalesce LIST
return the first non-empty item in the list. Extra good: if we can do Sprig'scoalesce A B C....
with varargs, returning the first non-empty argternary TRUE_VAL FALSE_VAL TEST
If TEST is true, return TRUE_VAL, otherwise return FALSE_VALThe text was updated successfully, but these errors were encountered: