🚀 Launch Week Day 4:Introducing the Alert Details Page: A Better Way to Explore Alerts.Learn More →
Socket
Book a DemoInstallSign in
Socket

helper-require

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

helper-require

Use any node module in templates. Should work with Handlebars, Lo-Dash, underscore, or any template engine that has support for helper functions.

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

helper-require NPM version Build Status

Use any node module in templates. Should work with Handlebars, Lo-Dash, underscore, or any template engine that has support for helper functions.

Install with npm

npm i helper-require --save-dev

Usage

var helper = require('helper-require');

Usage with verb

If you use a .verb.md, just add the helper to devDependencies. If you use a verbfile.js, you can register the helper like this:

verb.helper('require', require('helper-require'));
// usage
// {%= require('get-value')({a: {b: {c: 'foo'}}}, 'a.b.c') %}
// //=> 'foo'

Usage with assemble

assemble.helper('require', require('helper-require'));
// usage (pass {a: {b: {c: 'foo'}}} on the context)
// {{require, 'get-value' this 'a.b.c'}}
// //=> 'foo'

Run tests

Install dev dependencies:

npm i -d && npm test

Contributing

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

Author

Jon Schlinkert

License

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

This file was generated by verb on February 08, 2015.

FAQs

Package last updated on 09 Feb 2015

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