helpers / handlebars-helpers

188 handlebars helpers in ~20 categories. Can be used with Assemble, Ghost, YUI, express.js etc.
http://assemble.io/helpers/
MIT License
2.22k stars 364 forks source link

Add ternary operator #340

Closed ghost closed 5 years ago

jonschlinkert commented 5 years ago

Hi @indrekpaas, thanks for the PR. What is the advantage of this over the {{or ...}} helper? The or helper allows an unlimited number of arguments, but the ternary helper only allows two. Also, you will need to do validation to ensure that the second argument is not the handlebars options object.

Also, looks like you manually edited the README, as it states in the readme, you must build the readme , which automatically generates all of the documentation and updates the line numbers. All of the links for the code below the code you added will be broken.

jonschlinkert commented 5 years ago

No worries! Thanks for the pull request, you're welcome to submit another in the future!

On Thu, Jan 10, 2019 at 10:42 PM Indrek Paas notifications@github.com wrote:

Hi @jonschlinkert https://github.com/jonschlinkert, I had completely overlooked the or helper.

I agree the current or helper is very flexible and there won't be additional need for the ternary one.

Cheers

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/helpers/handlebars-helpers/pull/340#issuecomment-453368287, or mute the thread https://github.com/notifications/unsubscribe-auth/AAXb-gZpKGeTPflf2peQCm7izhn97KR_ks5vCAgugaJpZM4Z6tiH .

--

Jon Schlinkert CEO, Sellside, Inc. (513) 616-4335

github.com/jonschlinkert linkedin.com/in/jonschlinkert http://www.linkedin.com/in/jonschlinkert twitter.com/jonschlinkert http://www.twitter.com/jonschlinkert