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

pkgs-graph

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pkgs-graph

Create a graph from an array of packages

  • 6.1.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.7K
decreased by-34.15%
Maintainers
1
Weekly downloads
 
Created
Source

pkgs-graph

Create a graph from an array of packages

npm version

Installation

<npm|yarn|pnpm> add pkgs-graph

Usage

import createPkgsGraph from 'pkgs-graph'

const {graph} = createPkgsGraph([
  {
    dir: '/home/zkochan/src/foo',
    manifest: {
      name: 'foo',
      version: '1.0.0',
      dependencies: {
        bar: '^1.0.0',
      },
    },
  },
  {
    dir: '/home/zkochan/src/bar',
    manifest: {
      name: 'bar',
      version: '1.1.0',
    },
  }
])

console.log(graph)
//> {
//    '/home/zkochan/src/foo': {
//      dependencies: ['/home/zkochan/src/bar'],
//      manifest: {
//        name: 'foo',
//        version: '1.0.0',
//        dependencies: {
//          bar: '^1.0.0',
//        },
//      },
//    },
//    '/home/zkochan/src/bar': {
//      dependencies: [],
//      manifest: {
//        name: 'bar',
//        version: '1.1.0',
//      },
//    },
//  }
  • find-packages - Find all packages inside a directory
  • sort-pkgs - Sort packages. Dependents first.

License

MIT © Zoltan Kochan

FAQs

Package last updated on 30 May 2021

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

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