1.2.2 • Published 7 years ago

extract-package v1.2.2

Weekly downloads
24
License
MIT
Repository
github
Last release
7 years ago

npm version

extract-package

Download and extract npm package version

Requires

Node 6+

Install

$ npm install extract-package

Usage

const extractPackage = require('extract-package')

extractPackage({
  name: 'lodash'
}).then(response => {
  // path where package is downloaded
  console.log(response)
}).catch(error => {
  // oops!
})

Specify a version

extractPackage({
  name: 'lodash',
  version: '1.0.0'
})

Specify where to drop the package

extractPackage({
  name: 'lodash',
  version: '1.0.0',
  dest: '/path/to/folder'
})

Satisfy major versions

Assuming that the package version are 1.4.5, 1.6.5 and 2.0.0, this example will download the version 1.6.5, which is the latest version that satisfies that major version.

extractPackage({
  name: 'lodash',
  version: '1'
}, true)
1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago