-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reverse Helper does not work as documented #292
Comments
Hi @mattcoy-arcticleaf, we can't support array there since it might have breaking compatibilities with other helpers, but we can create a new one to support array type. Also Pull Requests are always welcome! |
Hi @jairo-bc , thanks for the quick reply here! It looks like the reverse helper as it is implemented in the handlebars-helpers library has compatibility for strings in addition to arrays now, and the code for strings is identical. I don't think anything would break by updating the one in paper-handlebars to match. I would add a pull request to make this update, but I'm not sure where it belongs, since currently "reverse" lives under strings, but it should be moved somewhere else now? |
It's possible someone may be relying (knowingly or unknowingly) on The safest approach would be to add a new helper (which is what handlebars-helpers seems to have done, albeit with the same name - string reverse still exists, and I believe array reverse was added later). |
on the Handlebars helpers reference, reverse is listed as “reverses a string”, but if you click on it, it takes you here, which says you can reverse a string or an array. However, in Stencil, it does not appear to reverse an array. Can the helper be updated to reverse an array as well, as documented?
The text was updated successfully, but these errors were encountered: