code: function checkDeps (basedir, options) {
    options = options || {}
    options.checkDirs = options.checkDirs || [ '*.js' ]
    options.ignoreDirs = options.ignoreDirs || []
    options.ignores = options.ignores || []
  
    debug('check deps: baseDir = %s, options = %j', basedir, options)
  
    // minimatchs
    let ignores = []
    options.ignores.forEach(pattern => {
      ignores.push(new Minimatch(pattern))
    })
  
    // find deps
    let files = options.files || findFiles(basedir, options.checkDirs, options.ignoreDirs)
    let depModules = resolveFilesDeps(files, ignores)
  
    // check dependencies
    let pkg = require(path.join(basedir, 'package.json'))
    let dependencies = Object.assign(
      {},
      pkg.dependencies || {},
      pkg.peerDependencies || {},
      pkg.optionDependencies || {}
    )
    let missing = []
  
    depModules.forEach(dep => {
      // skip builtin-modules
      if (builtinModules.indexOf(dep) >= 0) {
        return
      }
  
      if (!(dep in dependencies)) {
        missing.push(dep)
      }
    })
  
    return missing
  }
docs: check dependencies
  @param  {String} basedir
  @param  {Object} options
  - checkDirs: {String} check these dirs for dependencies
  - ignores: {Array} ignore these modules when check dependencies
  - files: {Array} check these files directly
  @return {Array} missed dependencies