StackGenVis: Alignment of Data, Algorithms, and Models for Stacking Ensemble Learning Using Performance Metrics https://doi.org/10.1109/TVCG.2020.3030352
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
StackGenVis/frontend/node_modules/helper-cache
Angelos Chatzimparmpas e069030893 fix the frontend 3 years ago
..
node_modules fix the frontend 3 years ago
LICENSE fix the frontend 3 years ago
README.md fix the frontend 3 years ago
index.js fix the frontend 3 years ago
package.json fix the frontend 3 years ago

README.md

helper-cache NPM version Build Status

Easily register and get helper functions to be passed to any template engine or node.js application. Methods for both sync and async helpers.

Install with npm

npm i helper-cache --save

Usage

HelperCache

Create an instance of HelperCache, optionally passing default options.

  • options {Object}: Default options to use.
    • bind {Boolean}: Bind functions to this. Defaults to false.
    • thisArg {Boolean}: The context to use.
var HelperCache = require('helper-cache');
var helpers = new HelperCache();

.addHelper

Register a helper.

  • name {String}: The name of the helper.
  • fn {Function}: Helper function.
  • returns {Object}: Return this to enable chaining
helpers.addHelper('lower', function(str) {
  return str.toLowerCase();
});

.addAsyncHelper

Register an async helper.

  • key {String}: The name of the helper.
  • fn {Function}: Helper function.
  • returns {Object}: Return this to enable chaining
helpers.addAsyncHelper('foo', function (str, callback) {
  callback(null, str + ' foo');
});

.addHelpers

Load an object of helpers.

  • key {String}: The name of the helper.
  • fn {Function}: Helper function.
  • returns {Object}: Return this to enable chaining.
helpers.addHelpers({
  a: function() {},
  b: function() {},
  c: function() {},
});

.addAsyncHelpers

Load an object of async helpers.

  • key {String}: The name of the helper.
  • fn {Function}: Helper function.
  • returns {Object}: Return this to enable chaining
helpers.addAsyncHelpers({
  a: function() {},
  b: function() {},
  c: function() {},
});

.getHelper

Get a registered helper.

  • key {String}: The helper to get.
  • returns {Object}: The specified helper. If no key is passed, the entire cache is returned.
helpers.getHelper('foo');

Running 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) 2014-2015 Jon Schlinkert
Released under the MIT license


This file was generated by verb-cli on April 23, 2015.