Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'use strict'
var validate = require('aproba')
var asyncMap = require('slide').asyncMap
var chain = require('slide').chain
var npmInstallChecks = require('npm-install-checks')
var iferr = require('iferr')
var checkEngine = npmInstallChecks.checkEngine
var checkPlatform = npmInstallChecks.checkPlatform
var npm = require('../npm.js')
module.exports = function (idealTree, args, next) {
validate('OAF', arguments)
var force = npm.config.get('force')
asyncMap(args, function (pkg, done) {
chain([
[hasMinimumFields, pkg],
[checkSelf, idealTree, pkg, force],
[isInstallable, pkg]
], done)
}, next)
}