clay / handlebars

A collection of helpers and partials for handlebars
MIT License
15 stars 8 forks source link

Addressing issue #52 "ALL conditional helpers can be inline" #56

Open tonicblue opened 5 years ago

tonicblue commented 5 years ago

As stated by @amycheng in issue "ALL conditional helpers can be inline #52", compare and modulo can both be used inline. It would be super useful to allow ifAll, ifNone, ifAny, and unlessAll to work in the same way.

Tried to keep things as simple as possible and copied the way you've written unit tests for everything so there is still the same coverage. I am now however returning false instead of an empty string. Am happy to continue to return an empty string if you'd prefer. Also, like modulo but unlike an inline if you cannot provide an else="stuff".

Hope this is all acceptable, Cheers for the module

jonwinton commented 5 years ago

Hey @tonicblue , sorry for the slow response. We'll look into getting this merged once we identify why Travis didn't build properly.

Sorry for the slow response!

tonicblue commented 5 years ago

That's cool. Sorry I'm now slow to respond too! If it's a quick and easy to describe build issue that I can address just let me know and I'll give it a shot.

Cheers

coveralls commented 4 years ago

Coverage Status

Coverage increased (+0.02%) to 99.55% when pulling ebdbda41ef6a5b5ba0a6e0c0e97a4b4f0e1a9832 on scvodigital:master into a1fb8b30ebdeb35ecb5c9deec3420fb39e0dc3eb on clay:master.