handlebars-helpers
handlebars-helpers copied to clipboard
truncateWords helper not working
I'm attempting to use the truncateWords
helper, but it's failing to truncate a block of text. It looks like the culprit is this line in the helper's definition:
if (num > arr.length) { ... }
My assumption is that it should read <
instead of >
.
I think you're right, thanks for opening the issue.
Would you like to submit a PR with the fix? If so, if you add some tests like the truncate tests that would be really helpful.