1.2.0 • Published 5 months ago

toposource v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

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

1.2.0

5 months ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago