gather-dependencies.js
function rpt_cb (err, data) {
    if (err) return logger.error(err)
    if (data.error) return logger.error(data.error)
    if (!data.package) {
      logger.warn('`data.package` not defined. Initializing placeholder.')
      data.package = {}
    }

    var dependencyReport = {}

    if (!data.package || !data.package.name) logger.warn('`data.package.name` missing')
    dependencyReport.name = data.package.name

    if (!data.package || !data.package.version) logger.warn('`data.package.version` missing')
    dependencyReport.version = data.package.version

    if (options.meta) {
      dependencyReport.meta = {
        nodeVersions: process.versions,
        date: Date.now()
      }
    }

    buildDependencyReport(dependencyReport, data, options, 0)

    // Finally, return gatherDependencies callback
    callback(null, dependencyReport)
  }
function rpt_cb (err, data) {
    if (err) return logger.error(err)
    if (data.error) return logger.error(data.error)
    if (!data.package) {
      logger.warn('`data.package` not defined. Initializing placeholder.')
      data.package = {}
    }

    var dependencyReport = {}

    if (!data.package || !data.package.name) logger.warn('`data.package.name` missing')
    dependencyReport.name = data.package.name

    if (!data.package || !data.package.version) logger.warn('`data.package.version` missing')
    dependencyReport.version = data.package.version

    if (options.meta) {
      dependencyReport.meta = {
        nodeVersions: process.versions,
        date: Date.now()
      }
    }

    buildDependencyReport(dependencyReport, data, options, 0)

    // Finally, return gatherDependencies callback
    callback(null, dependencyReport)
  }
function rpt_cb ( err , data ) { if ( err ) return logger . error ( err ) if ( data . error ) return logger . error ( data . error ) if ( ! data . package ) { logger . warn ( '`data.package` not defined. Initializing placeholder.' ) data . package = { } } var dependencyReport = { } if ( ! data . package || ! data . package . name ) logger . warn ( '`data.package.name` missing' ) dependencyReport . name = data . package . name if ( ! data . package || ! data . package . version ) logger . warn ( '`data.package.version` missing' ) dependencyReport . version = data . package . version if ( options . meta ) { dependencyReport . meta = { nodeVersions : process . versions , date : Date . now ( ) } } buildDependencyReport ( dependencyReport , data , options , 0 ) // Finally, return gatherDependencies callback callback ( null , dependencyReport ) }
read-package-tree callback
@param  {error}  err  read-package-tree error
@param  {object} data read-package-tree blob (contains cyclical refrences)
read - package - tree callback