Socket
Book a DemoInstallSign in
Socket

handlebars-helper-lorem

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

handlebars-helper-lorem

Handlebars template helper for generator lorem-ipsum placeholder text.

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

handlebars-helper-lorem NPM version

Handlebars template helper for generator lorem-ipsum placeholder text.

Install

Install with npm

npm i handlebars-helper-lorem --save

Run tests

npm test

Register the helper

This should work with any engine, here are a few examples

template

template.helper('handlebars-lorem', require('handlebars-helper-lorem'));

assemble

Assemble ^0.6.0:

assemble.helper('handlebars-lorem', require('handlebars-helper-lorem'));

Assemble ^0.4.0:

assemble: {
  options: {
    // also be sure to add the helper to dependencies or devDependencies in package.json
    helpers: ['handlebars-helper-lorem']
  }
}

verb

Verb ^0.3.0:

verb.helper('handlebars-lorem', require('handlebars-helper-lorem'));

handlebars

var handlebars = require('handlebars');
handlebars.registerHelper('handlebars-lorem', require('handlebars-helper-lorem'));

Example usage

Handlebars:

// use default options
var template = Handlebars.compile('{{lorem}}');
var result = template();

// pass options on the context
var context = {count: 7, units: 'words'}
var template = Handlebars.compile('{{lorem this}}');
var result = template(context);

// pass options on the helper hash
var template = Handlebars.compile('{{lorem count="7" units="words"}}');
var result = template();

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

Author

Jon Schlinkert

License

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

This file was generated by verb on November 11, 2014.

Keywords

docs

FAQs

Package last updated on 12 Nov 2014

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