helpers / helper-compile-async

Convenience method to compile async helpers and add common functionality to use with async-helpers.

Home Page:https://github.com/helpers/helper-compile-async

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

helper-compile-async NPM version NPM monthly downloads NPM total downloads Linux Build Status

Convenience method to compile async helpers and add common functionality to use with async-helpers.

Install

Install with npm:

$ npm install --save helper-compile-async

Usage

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

API

Compile a helper function to add convenience methods for working with async-helpers.

Params

  • helper {Function}: Helper function to be called with a modified options.fn and options.inverse function if available.
  • returns {Function}: Compiled helper function suitable to be registered with a template engine.

Example

// ensures that asyncHelpers.resolveIds is called on the
// rendered content from `options.fn` before returning
var helper = compile(function(options, cb) {
  return options.fn(this, cb);
});

About

Contributing

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

Please read the contributing guide for advice on opening issues, pull requests, and coding standards.

Building docs

(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)

To generate the readme, run the following command:

$ npm install -g verbose/verb#dev verb-generate-readme && verb

Running tests

Install dev dependencies:

$ npm install && npm test

Author

Brian Woodward

License

Copyright © 2017, Brian Woodward. MIT


This file was generated by verb-generate-readme, v0.4.2, on February 05, 2017.

About

Convenience method to compile async helpers and add common functionality to use with async-helpers.

https://github.com/helpers/helper-compile-async

License:MIT License


Languages

Language:JavaScript 100.0%