Handlebars helper. Returns true if a value exists in an array. Faster than using indexOf and won't blow up on null values.
Install with npm:
npm i handlebars-helper-inarray --save
var inArray = require('in-array');
var Handlebars = require('handlebars');
Handlebars.registerHelper('inArray', inArray);
With Assemble:
// helpers/in-array.js
module.exports.register = function(Handlebars) {
Handlebars.registerHelper('inArray', inArray);
};
In the config:
options: {
helpers: ['helpers/in-array.js']
}
Jon Schlinkert
Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license
This file was generated by verb-cli on June 26, 2014.