code: function validate(opts) {
    opts = opts || {};
  
    var pkg;
  
    if (opts.packageFile) {
      pkg = require(opts.packageFile);
    } else {
      pkg = require(require('path').join(process.cwd(), 'package.json'));
    }
  
    var depsErrors = [];
    var devDepsErrors = [];
  
    var deps = pkg.dependencies || {};
    var devDeps = pkg.devDependencies || {};
  
    var depsEnforce = opts.dependencies || '~';
    var devDepsEnforce = opts.devDependencies || '^';
  
    if (opts.only && !Array.isArray(opts.only)) {
      opts.only = [ opts.only ];
    }
  
    if (!opts.only || ~opts.only.indexOf('prod') || ~opts.only.indexOf('production')) {
      depsErrors = _processDeps(deps, depsEnforce, opts);
    }
  
    if (!opts.only || ~opts.only.indexOf('dev') || ~opts.only.indexOf('development')) {
      devDepsErrors = _processDeps(devDeps, devDepsEnforce, opts);
    }
  
    return { dependencies: depsErrors, devDependencies: devDepsErrors };
  }
docs: /* Public 
  The main backbone validation function.
  
  This will return an Object containing two keys against any
  validation errors found when validating. If both keys are
  empty Arrays, you can assume that validation succeeded.
  
  @param opts an options Object (see README.md).
  @returns {{dependencies: Array, devDependencies: Array}}.