Package Exports
- helper-cache
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (helper-cache) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
helper-cache 
Easily get and set helper functions to pass to any application or template engine.
Install
Install with npm:
npm i helper-cache --save-dev
Usage
var Cache = require('helper-cache');
var helpers = new Cache();
helpers.set('a', function (str) {
return str.toLowerCase();
});
helpers.set('b', function (str) {
return str.toUpperCase();
});
console.log(helpers)
//=> { options: { bindFunctions: false },
// '.a': [Function],
// '.b': [Function] }
var mixins = new Cache();
mixins.set('a', function (str) {
return str.toLowerCase();
});
mixins.set('b', function (str) {
return str.toUpperCase();
});
console.log(mixins);
//=> { options: { bindFunctions: false },
// '.a': [Function],
// '.b': [Function] }
API
Helpers
options
{Object}: Default options to use.bindFunctions
{Boolean}: Bind functions tothis
. Defaults tofalse
.
var Helpers = require('helper-cache');
var helpers = new Helpers();
Set helpers on the cache.
See load-helpers for issues, API details and the full range of options.
.exports
key
{String}: The helper to get.returns
{Object}: The specified helper. If nokey
is passed, the entire cache is returned.
Get a helper from the cache.
Author
Jon Schlinkert
Brian Woodward
License
Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license
This file was generated by verb-cli on August 29, 2014.