index.js
function readData(fp, options) {
  // shallow clone options
  var opts = utils.extend({}, options);
  // get the loader for this file.
  var ext = opts.lang || path.extname(fp);
  if (ext && ext.charAt(0) !== '.') {
    ext = '.' + ext;
  }
  if (!this.dataLoaders.hasOwnProperty(ext)) {
    return this.dataLoader('read')(fp, opts);
  }
  return this.dataLoader(ext)(fp, opts);
}
function readData(fp, options) {
  // shallow clone options
  var opts = utils.extend({}, options);
  // get the loader for this file.
  var ext = opts.lang || path.extname(fp);
  if (ext && ext.charAt(0) !== '.') {
    ext = '.' + ext;
  }
  if (!this.dataLoaders.hasOwnProperty(ext)) {
    return this.dataLoader('read')(fp, opts);
  }
  return this.dataLoader(ext)(fp, opts);
}
function readData ( fp , options ) { // shallow clone options var opts = utils . extend ( { } , options ) ; // get the loader for this file. var ext = opts . lang || path . extname ( fp ) ; if ( ext && ext . charAt ( 0 ) !== '.' ) { ext = '.' + ext ; } if ( ! this . dataLoaders . hasOwnProperty ( ext ) ) { return this . dataLoader ( 'read' ) ( fp , opts ) ; } return this . dataLoader ( ext ) ( fp , opts ) ; }
Utility for reading data files.

@param {String} `fp` Filepath to read.
@param {Object} `options` Options to pass to [js-yaml]
@api private
Utility for reading data files .