handlebars-helper
handlebars-helper copied to clipboard
A collection of Handlebars Helpers for use with Solidus
How to get index inside between?
I needed a way to reproducibly shuffle an array, so that I won't get different results each time the template is running (unless the underlying data is changed). This PR...
Hey, thanks for these helpers :) For easier consumption, I would suggest re-organizing the helpers to follow this kind of pattern: https://github.com/solarmosaic/handlebars-helpers As-is, requiring individual helpers is overly redundant: ```...
The number helper should provide a set of tools for turning a number into a string representation of the number. Numbers like `1000` can be converted to formats like: `1,000`,...
Inserting machine readable datetimes is sometimes needed in templates, i.e. for the [``](http://www.w3.org/TR/html5/text-level-semantics.html#attr-time-datetime) element's `datetime` attribute and similar microdata. This can also be useful when scripting. The format of course...
We could probably use a helper to provide access to variables that are out of the current scope. Since we usually need to just access something at the top of...
Right now many helpers will completely break template rendering if they don't get data of the correct type. Ideally this should just return nothing (from the helper), rather than destroy...
A helper for formatting time strings. Ideally for converting things like `233` to `5:53`.