index.js
function getLayoutName(file, options) {
  const defaultLayout = options.defaultLayout;
  const prop = options.layoutProp || 'layout';
  const name = file[prop];
  if (typeof name === 'undefined' || name === true || name === defaultLayout) {
    return defaultLayout;
  }
  if (!name || ['false', 'null', 'nil', 'none', 'undefined'].includes(name.toLowerCase())) {
    return false;
  }
  return name;
}
function getLayoutName(file, options) {
  const defaultLayout = options.defaultLayout;
  const prop = options.layoutProp || 'layout';
  const name = file[prop];
  if (typeof name === 'undefined' || name === true || name === defaultLayout) {
    return defaultLayout;
  }
  if (!name || ['false', 'null', 'nil', 'none', 'undefined'].includes(name.toLowerCase())) {
    return false;
  }
  return name;
}
function getLayoutName ( file , options ) { const defaultLayout = options . defaultLayout ; const prop = options . layoutProp || 'layout' ; const name = file [ prop ] ; if ( typeof name === 'undefined' || name === true || name === defaultLayout ) { return defaultLayout ; } if ( ! name || [ 'false' , 'null' , 'nil' , 'none' , 'undefined' ] . includes ( name . toLowerCase ( ) ) ) { return false ; } return name ; }
Get the name of the layout to use.
@param  {Object} `file`
@param  {Object} `options`
@return {String|Null} Returns the name of the layout to use or `false`
Get the name of the layout to use .