0.0.5 • Published 3 years ago

cimpress-handlebars-helpers v0.0.5

Weekly downloads
2
License
MIT
Repository
github
Last release
3 years ago

A set of simple handlebars helpers

Included helpers

Usage

flatMap

import {flatMapHelper} from 'cimpress-handlebars-helpers';
handlebars.registerHelper("flatMap", flatMapHelper);
Params
  • array - an array to iterate over
  • path - a path that identifies the element to take
Example
{{flatMap array "itemId"}}

filterByValues

import {filterByValuesHelper} from 'cimpress-handlebars-helpers';
handlebars.registerHelper("filterByValues", filterByValuesHelper);
Params
  • collection - an array to iterate over
  • element - element to use for filtering
  • values - filter the array based on these values
Example
{{filterByValues items 'itemId' [ '1', '2', '3' ] }}
0.0.5

3 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago