create-dependency-stream

0.1.1 • Public • Published

create-dependency-stream

Synopsis

var createDependencyStream = require('create-dependency-stream')
var pkgJSON = require('./package.json'); 
var stream = createDependencyStream(pkgJSON, {
  registry: 'http://registry.npmjs.org' // optional
});
 
stream.on('data', console.log);
/* emits dependency objects like: */
{ name: 'request',
  versionRange: '2.x',
  version: '2.21.0',
  package: { /* .. parsed package.json contents .. */ },
  parent: { /* .. dependency object that included this dependency .. */ }
  dependencies: { /* .. mapping from dependency names to dependency object .. */ }
}

Description

Given a parsed package.json with dependencies, this will create a stream of "dependency objects" containing the fully resolved versions and corresponding package.json contents for every dependency and every child dependency, in a way that (should be) completely compatible with npm.

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.1
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.1
    3
  • 0.1.0
    0
  • 0.0.0
    0

Package Sidebar

Install

npm i create-dependency-stream

Weekly Downloads

3

Version

0.1.1

License

MIT

Last publish

Collaborators

  • grncdr