index.js
function getFile(backend, file, cb) {
  getBackendConfig(backend, function (err, config) {
    file = [ config[':datadir'], '/', file ].join('');

    fs.readFile(file, cb);
  });
}
function getFile(backend, file, cb) {
  getBackendConfig(backend, function (err, config) {
    file = [ config[':datadir'], '/', file ].join('');

    fs.readFile(file, cb);
  });
}
Retrieves data from a Hiera file.

@param {string} backend - the backend to load.
@param {string} file - the Hiera file to load.
@param {Function} cb - callback to invoke.

@example getFile('yaml', 'defaults.yaml', function (err, data) { ... });