🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

npm-install-package

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-install-package

Install an npm package

latest
Source
npmnpm
Version
2.1.0
Version published
Weekly downloads
26K
-16.12%
Maintainers
2
Weekly downloads
 
Created
Source

npm-install-package

NPM version build status Test coverage Downloads js-standard-style

Install an npm package.

Installation

$ npm install npm-install-package

Usage

var install = require('npm-install-package')

install('minimist', function (err) {
  if (err) throw err
})

With multiple installs, offline-first fetching and saving to dev dependencies:

var install = require('npm-install-package')

var devDeps = [ 'map-limit', 'minimist', 'cliclopts' ]
var opts = { saveDev: true, cache: true }

install(devDeps, opts, function (err) {
  if (err) throw err
})

API

install(dependencies, options, cb)

Install an array of dependencies. Opts can contain the following values:

  • save: save a value to dependencies. Defaults to false
  • saveDev: save a value to devDependencies. Defaults to false
  • cache: attempt to get packages from the local cache first. Defaults to false
  • silent: install packages silently without writing to stdout. Defaults to false

License

MIT

Keywords

npm

FAQs

Package last updated on 22 Dec 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts