Socket
Socket
Sign inDemoInstall

toposource

Package Overview
Dependencies
0
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

toposource

Directed graphs analyzer for parallel traversals


Version published
Maintainers
1
Weekly downloads
5,036
decreased by-6.72%

Weekly downloads

Readme

Source

toposource

CI Maintainability Test Coverage

Directed graphs analyzer for parallel traversals

Usage

import { analyze } from 'toposource'

analyze([['a', 'b'], ['b', 'c'], ['d', 'c'], ['e', 'f']])
// →
{
  next: new Map([
    ['a', ['b']],
    ['b', ['c']],
    ['d', ['c']],
    ['e', ['f']]
  ]),
  prev: new Map([
    ['b', ['a']],
    ['c', ['b', 'd']],
    ['f', ['e']]
  ]),
  sources: [ 'a', 'd', 'e' ],
  queue: ['a', 'd', 'e', 'b', 'c', 'f'],
  graphs: [{
    sources: ['a', 'd'],
    nodes: new Set(['a', 'b', 'd', 'c'])
  }, {
    sources: ['e'],
    nodes: new Set(['e', 'f'])
  },
}

Alternatives

License

MIT

Keywords

FAQs

Last updated on 18 Dec 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc