index.js
function validateConfig(config) {
    let missing = [];
    _.each(requiredOptions, function (option) {
      if (config[option] === undefined) {
        missing.push(option);
      }
    });
    if (missing.length > 0) {
      throw new Error('The following required parameters were not provided: ' + missing.join(','));
    }
  }
function validateConfig(config) {
    let missing = [];
    _.each(requiredOptions, function (option) {
      if (config[option] === undefined) {
        missing.push(option);
      }
    });
    if (missing.length > 0) {
      throw new Error('The following required parameters were not provided: ' + missing.join(','));
    }
  }
function validateConfig ( config ) { let missing = [ ] ; _ . each ( requiredOptions , function ( option ) { if ( config [ option ] === undefined ) { missing . push ( option ) ; } } ) ; if ( missing . length > 0 ) { throw new Error ( 'The following required parameters were not provided: ' + missing . join ( ',' ) ) ; } }
Check that required config is set
@param config
Check that required config is set