Registers additional Handlebars helper in Pattern Lab Node version.
Based on handlebars-helper-slugify
The slugify
helper takes 1 argument: str
{{ slugify 'I am a title' }}
Renders to:
i-am-a-title
The bemModfier
helper takes 2 arguments: block, modifier
{{ bemModifier 'block' [ 'modifier-1', 'modifier-2' ] }}
Renders to:
block block--modifier-1 block--modifier-2
The bemElementOf
helper takes 2 arguments: block, element
{{ bemElementOf 'block' 'element' }}
Renders to:
block__element
compare helper (stolen form hellokatili)
The compare
helper takes 3 arguments: value1 operator value2
{{#compare unicorns '!=' ponies}}
I knew it, unicorns are NOT ponies!
{{/compare}}
math helper (stolen form hellokatili)
The math
helper takes 3 arguments: value1 operator value2
{{math 5 '+' 37}}
Renders to:
42