npm.io
0.2.0 • Published 2 years ago

tarjan-scc

Licence
MIT
Version
0.2.0
Deps
0
Size
15 kB
Vulns
0
Weekly
0

Tarjan-SCC

Install:

npm install --save tarjan-scc

Usage:

import { Tarjan } from 'tarjan-scc';

const t = new Tarjan();

// Add verticies.
t.addVertex(1);
t.addVertex(2);
t.addVertex(3);
t.addVertex(4);

// Connect vertices.
t.connectVertices(1, 2);
t.connectVertices(2, 3);
t.connectVertices(3, 4);
t.connectVertices(4, 2);

// Check for loops.
t.hasLoops(); // true

Publish a Release

  1. Update to a new version (x.x.x) in package.json
  2. git commit -am "release x.x.x"
  3. git push origin main
  4. git tag vx.x.x
  5. git push origin vx.x.x
  6. npm run compile
  7. npm publish ./

Keywords