function revert (moduleName) {
  if (moduleName) {
    console.log('reverting module', JSON.stringify(moduleName))
  }

  var toCheck = getDependenciesToCheck({}, moduleName)
  debug('need to check')
  debug(toCheck)

  var installPromises = toCheck.map(function (info) {
    la(isRevertInfo(info), 'invalid revert info', info)
    return installModule.bind(null, {
      name: info.name,
      version: info.version,
      tldr: false
    })
  })
  return installPromises.reduce(q.when, q())
}
function revert (moduleName) {
  if (moduleName) {
    console.log('reverting module', JSON.stringify(moduleName))
  }

  var toCheck = getDependenciesToCheck({}, moduleName)
  debug('need to check')
  debug(toCheck)

  var installPromises = toCheck.map(function (info) {
    la(isRevertInfo(info), 'invalid revert info', info)
    return installModule.bind(null, {
      name: info.name,
      version: info.version,
      tldr: false
    })
  })
  return installPromises.reduce(q.when, q())
}
function revert ( moduleName ) { if ( moduleName ) { console . log ( 'reverting module' , JSON . stringify ( moduleName ) ) } var toCheck = getDependenciesToCheck ( { } , moduleName ) debug ( 'need to check' ) debug ( toCheck ) var installPromises = toCheck . map ( function ( info ) { la ( isRevertInfo ( info ) , 'invalid revert info' , info ) return installModule . bind ( null , { name : info . name , version : info . version , tldr : false } ) } ) return installPromises . reduce ( q . when , q ( ) ) }
returns promise
returns promise