Code coverage report for template/lib/loaders/index.js

Statements: 100% (12 / 12)      Branches: 100% (0 / 0)      Functions: 100% (2 / 2)      Lines: 100% (12 / 12)      Ignored: none     

All files » template/lib/loaders/ » index.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17    1 1 1   1 1661 626 626 626 626 626 626 626    
'use strict';
 
var Loader = require('load-templates');
var slice = require('array-slice');
var _ = require('lodash');
 
module.exports = function (plural, options) {
  return function () {
    var opts = _.merge({}, this.options, options);
    var loader = new Loader(opts);
    var args = slice(arguments);
    var next = args.pop();
    var value = loader.load.apply(loader, args);
    var res = this.normalize(plural, value, options);
    next(null, res);
  };
};