🚀 Launch Week Day 2:Introducing Custom Tabs for Org Alerts.Learn More →
Socket
Book a DemoInstallSign in
Socket

handlebars-helper-eachitems

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

handlebars-helper-eachitems

{{eachItems}} handlebars helper.

latest
Source
npmnpm
Version
0.1.2
Version published
Maintainers
1
Created
Source

{{eachItems}} NPM version

{{eachItems}} block helper, iterating over a list of items

Quickstart

In the root of your project, run the following in the command line:

npm i handlebars-helper-eachItems --save-dev

Assemble config

If you use Assemble config and Grunt, in your Gruntfile simply add handlebars-helper-eachItems to the helpers property in the Assemble task or target options:

grunt.initConfig({
  assemble: {
    options: {
      // the 'handlebars-helper-eachItems' module must also be listed in
      // devDependencies for assemble to automatically resolve the helper
      helpers: ['handlebars-helper-eachItems', 'foo/*.js']
    }
    ...
  }
});

You can now use begin using the helper in your templates:

{{#eachItems pages}}
  <li{{#is ../page.dest this.dest}} class="active"{{/is}}>
    <a href="{{relative ../page.dest this.dest}}">{{@number}}</a>
  </li>
{{/eachItems}}

Author

Licensed under the MIT License Copyright (c) Jon Schlinkert, contributors.

Keywords

assemble

FAQs

Package last updated on 30 Oct 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts