https://github.com/helpers/handlebars-helper-lorem
{{lorem}} handlebars helper, for generating lorem lorem placeholder text.
https://github.com/helpers/handlebars-helper-lorem
Last synced: 9 months ago
JSON representation
{{lorem}} handlebars helper, for generating lorem lorem placeholder text.
- Host: GitHub
- URL: https://github.com/helpers/handlebars-helper-lorem
- Owner: helpers
- License: mit
- Created: 2013-10-22T09:22:42.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-11-13T22:04:31.000Z (about 11 years ago)
- Last Synced: 2025-04-11T23:06:50.294Z (9 months ago)
- Language: JavaScript
- Homepage: http://assemble.io/helpers/
- Size: 137 KB
- Stars: 5
- Watchers: 7
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE-MIT
Awesome Lists containing this project
README
# handlebars-helper-lorem [](http://badge.fury.io/js/handlebars-helper-lorem)
> Handlebars template helper for generator lorem-ipsum placeholder text.
## Install
### Install with [npm](npmjs.org)
```bash
npm i handlebars-helper-lorem --save
```
## Run tests
```bash
npm test
```
## Register the helper
> This should work with any engine, here are a few examples
### [template](https://github.com/jonschlinkert/template)
```js
template.helper('handlebars-lorem', require('handlebars-helper-lorem'));
```
### [assemble](https://github.com/assemble/assemble)
**Assemble ^0.6.0:**
```js
assemble.helper('handlebars-lorem', require('handlebars-helper-lorem'));
```
**Assemble ^0.4.0:**
You'll have to pass assemble's instance of `handlebars` to the helper.
```js
var handlebars = require('assemble/.../handlebars');
require('handlebars-helper-lorem')(handlebars);
assemble: {
options: {}
}
```
### [verb](https://github.com/jonschlinkert/verb)
Verb ^0.3.0:
```js
verb.helper('handlebars-lorem', require('handlebars-helper-lorem'));
```
### [handlebars](https://github.com/wycats/handlebars.js/)
```js
var handlebars = require('handlebars');
handlebars.registerHelper('handlebars-lorem', require('handlebars-helper-lorem'));
```
## Example usage
Handlebars:
```js
// 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](https://github.com/helpers/handlebars-helper-lorem/issues)
## Author
**Jon Schlinkert**
+ [github/helpers](https://github.com/helpers)
+ [twitter/helpers](http://twitter.com/helpers)
## License
Copyright (c) 2014 Jon Schlinkert
Released under the MIT license
***
_This file was generated by [verb](https://github.com/assemble/verb) on November 13, 2014._