Skip to content
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

Template helpers #516

Merged
merged 21 commits into from
Sep 29, 2023
Merged

Template helpers #516

merged 21 commits into from
Sep 29, 2023

Conversation

ghinda
Copy link
Member

@ghinda ghinda commented Sep 29, 2023

Changes:

  • Add new handlebars helpers for the most requested features:
  • and/or helper for conditional rendering and defaults.
  • capitalize/capitalizeAll helpers.
  • text helper exposing all methods available on the String object.
  • list helper exposing all methods available on the Array object.
  • compare helper for comparison.
  • random helper as a replacement for the choice helper, but allowing mixing variables and strings, and not requiring a comma-separated string.
  • The choice and date helpers are deprecated, but still supported on legacy templates for now.

Use the sandbox to test compiling templates with helpers, even if not as clean.
Exposts Array methods.
We can now use the text helper, with the split method, and lookup for the specific indexes.
@ghinda ghinda self-assigned this Sep 29, 2023
@ghinda ghinda merged commit 16f9602 into master Sep 29, 2023
1 check passed
@ghinda ghinda deleted the ghinda--helpers branch September 29, 2023 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant