Skip to content

akinnee/handlebars-inArray-helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

handlebars-inArray-helper

A conditional helpers for handlebars to check if a value is in an array

Usage

in JavaScript

var arrayOfStuff = ['apples', 'oranges'];

in handlebars template

{{#inArray arrayOfStuff 'apples'}}
This will output
{{else}}
This will not
{{/inArray}}

{{#inArray arrayOfStuff 'cannonballs'}}
This will not output
{{else}}
This will
{{/inArray}}

About

A conditional helpers for handlebars to check if a value is in an array

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors