How to use load-yaml-file - 1 common examples

To help you get started, we’ve selected a few load-yaml-file examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zkochan / rcfile / index.js View on Github external
function loadYAMLConfigFile (filePath) {
  debug('Loading YAML config file: ' + filePath)

  try {
    // empty YAML file can be null, so always use
    return loadYamlFile.sync(filePath) || {}
  } catch (e) {
    debug('Error reading YAML file: ' + filePath)
    e.message = 'Cannot read config file: ' + filePath + '\nError: ' + e.message
    throw e
  }
}

load-yaml-file

Read and parse a YAML file.

MIT
Latest version published 3 years ago

Package Health Score

65 / 100
Full package analysis

Popular load-yaml-file functions

Similar packages