Skip to content

jonschlinkert/handlebars-helper-inarray

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

handlebars-helper-inarray NPM version

Handlebars helper. Returns true if a value exists in an array. Faster than using indexOf and won't blow up on null values.

Install

Install with npm:

npm i handlebars-helper-inarray --save

Usage

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']
}

Author

Jon Schlinkert

License

Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license


This file was generated by verb-cli on June 26, 2014.

About

Handlebars helper. Returns true if a value exists in an array. Faster than using indexOf and won't blow up on null values.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published