visionmedia/ejs — pull request #162 by palmerabollo (2014-03-05 08:18:02+00:00)
Title: Add a new filter that replaces falsy values with a default value

Include a filter that checks if a value if falsy and, in that case, replaces it with a default one (passed as an optional argument, empty string by default).

This is useful to make your intention clear (instead of <%= value || "my value" %>) and to combine it with other filters (e.g. <%=: value | default | capitalize %>).

It includes some tests.