🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

create-dependency-stream

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-dependency-stream

Create a stream of fully resolved dependencies from a package (and it's dependencies)

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

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

Keywords

dependency

FAQs

Package last updated on 11 Jun 2013

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