tasks/lib/layouts_manager.js
function(layout, fail) {
    if (_.isFunction(layout)) {
      return layout;
    }

    if (!_.isString(layout)) {
      fail('Layout should be specified by name or as a function');
    }

    if (_(defaultLayouts).has(layout)) {
      return defaultLayouts[layout];
    }

    fail('The following named layouts are supported: ' + _.keys(defaultLayouts).join(', '));
  }
function(layout, fail) {
    if (_.isFunction(layout)) {
      return layout;
    }

    if (!_.isString(layout)) {
      fail('Layout should be specified by name or as a function');
    }

    if (_(defaultLayouts).has(layout)) {
      return defaultLayouts[layout];
    }

    fail('The following named layouts are supported: ' + _.keys(defaultLayouts).join(', '));
  }
function ( layout , fail ) { if ( _ . isFunction ( layout ) ) { return layout ; } if ( ! _ . isString ( layout ) ) { fail ( 'Layout should be specified by name or as a function' ) ; } if ( _ ( defaultLayouts ) . has ( layout ) ) { return defaultLayouts [ layout ] ; } fail ( 'The following named layouts are supported: ' + _ . keys ( defaultLayouts ) . join ( ', ' ) ) ; }
Resolves named layouts, returns functions as is

@param {string | Function} layout name or layout function
@param { Function } fail handler
@returns {Function} layout function
Resolves named layouts returns functions as is