tasks/template.js
function(options) {
    var recurse = function(options) {
      _.each(options, function(value, key) {
        if (_.isFunction(value)) {
          options[key] = value();
        }
        else if (_.isObject(value)) {
          options[key] = recurse(value);
        }
      });
      return options;
    };

    return recurse(options);
  }
function(options) {
    var recurse = function(options) {
      _.each(options, function(value, key) {
        if (_.isFunction(value)) {
          options[key] = value();
        }
        else if (_.isObject(value)) {
          options[key] = recurse(value);
        }
      });
      return options;
    };

    return recurse(options);
  }
function ( options ) { var recurse = function ( options ) { _ . each ( options , function ( value , key ) { if ( _ . isFunction ( value ) ) { options [ key ] = value ( ) ; } else if ( _ . isObject ( value ) ) { options [ key ] = recurse ( value ) ; } } ) ; return options ; } ; return recurse ( options ) ; }
Iterates recursively over all provided options executes them in case the option was provided as a function.
Iterates recursively over all provided options executes them in case the option was provided as a function .