Sha256: b31e689d215a1cf269fecd46423ecfebab581b409f4e286df872a496d31bf121

Contents?: true

Size: 524 Bytes

Versions: 5

Compression:

Stored size: 524 Bytes

Contents

export default function(instance) {
  instance.registerHelper('log', function(/* message, options */) {
    let args = [undefined],
        options = arguments[arguments.length - 1];
    for (let i = 0; i < arguments.length - 1; i++) {
      args.push(arguments[i]);
    }

    let level = 1;
    if (options.hash.level != null) {
      level = options.hash.level;
    } else if (options.data && options.data.level != null) {
      level = options.data.level;
    }
    args[0] = level;

    instance.log(... args);
  });
}

Version data entries

5 entries across 5 versions & 3 rubygems

Version Path
locomotivecms-4.0.0.alpha1 app/javascript/node_modules/handlebars/lib/handlebars/helpers/log.js
locomotivecms-3.4.0 app/javascript/node_modules/handlebars/lib/handlebars/helpers/log.js
lanes-0.8.0 node_modules/handlebars/lib/handlebars/helpers/log.js
eslint_node_modules-1.6.0.1 vendor/node_modules/eslint/node_modules/handlebars/lib/handlebars/helpers/log.js
eslint_node_modules-1.6.0 vendor/node_modules/eslint/node_modules/handlebars/lib/handlebars/helpers/log.js