Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

npm-install-package

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-install-package - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

4

index.js

@@ -8,3 +8,3 @@ const exec = require('child_process').exec

// Install an npm package
// ([str], obj, obj, fn) -> null
// ([str]|str, obj, obj, fn) -> null
function npmInstallPackage (deps, opts, cb) {

@@ -15,3 +15,3 @@ if (!cb) {

}
Array.isArray(deps) ? deps : [ deps ]
deps = Array.isArray(deps) ? deps : [ deps ]
opts = opts || opts

@@ -18,0 +18,0 @@ cb = cb || noop

{
"name": "npm-install-package",
"version": "1.0.0",
"version": "1.0.1",
"description": "Install an npm package",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -19,2 +19,11 @@ # npm-install-package

npmInstallPackage('cliclopts', opts, err => {
if (err) throw err
})
```
With multiple installs, offline-first fetching and saving to dev dependencies:
```js
const npmInstallPackage = require('npm-install-package')
const devDeps = [ 'map-limit', 'minimist', 'cliclopts' ]

@@ -21,0 +30,0 @@ const opts = { saveDev: true, cache: true }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc