index.js
function construct(data) {
  const basepath = process.cwd();

  const files = data.map((f) => {
    const fullpath = p.join(basepath, f);

    const src = fs.readFileSync(fullpath, 'utf8');
    const t = yaml.load(src, {
      schema: YAML_FILES_SCHEMA,
      filename: fullpath
    });
    return t;
  });

  const t = files.reduce((m, f) => merge(m, f));
  return t;
}
function construct(data) {
  const basepath = process.cwd();

  const files = data.map((f) => {
    const fullpath = p.join(basepath, f);

    const src = fs.readFileSync(fullpath, 'utf8');
    const t = yaml.load(src, {
      schema: YAML_FILES_SCHEMA,
      filename: fullpath
    });
    return t;
  });

  const t = files.reduce((m, f) => merge(m, f));
  return t;
}
function construct ( data ) { const basepath = process . cwd ( ) ; const files = data . map ( ( f ) => { const fullpath = p . join ( basepath , f ) ; const src = fs . readFileSync ( fullpath , 'utf8' ) ; const t = yaml . load ( src , { schema : YAML_FILES_SCHEMA , filename : fullpath } ) ; return t ; } ) ; const t = files . reduce ( ( m , f ) => merge ( m , f ) ) ; return t ; }
Construct function for the yaml schema that reads a list of files
parse them and then merge them

@param {Object} data - input to the schema marker
@returns {Object} a parsed yaml object
Construct function for the yaml schema that reads a list of files parse them and then merge them