{
  "_id": "@rtsao/scc",
  "maintainers": [
    {
      "name": "rtsao",
      "email": "ryan.j.tsao@gmail.com"
    }
  ],
  "dist-tags": {
    "latest": "1.1.0"
  },
  "_rev": "2-dd0c3d1a57f3bd8348543f843b8a3e1b",
  "description": "Find strongly connected components of a directed graph using [Tarjan's algorithm](https://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm).",
  "readme": "# `@rtsao/scc`\n\nFind strongly connected components of a directed graph using [Tarjan's algorithm](https://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm).\n\nThis algorithm efficiently yields both a topological order and list of any cycles.\n\n## Installation\n\n```\nyarn add @rtsao/scc\n```\n\n```\nnpm install @rtsao/scc\n```\n\n## Usage\n\n```js\nconst scc = require(\"@rtsao/scc\");\n\nconst digraph = new Map([\n  [\"a\", new Set([\"c\", \"d\"])],\n  [\"b\", new Set([\"a\"])],\n  [\"c\", new Set([\"b\"])],\n  [\"d\", new Set([\"e\"])],\n  [\"e\", new Set()]\n]);\n\nconst components = scc(digraph);\n// [ Set { 'e' }, Set { 'd' }, Set { 'b', 'c', 'a' } ]\n```\n\n#### Illustration of example input digraph\n```\n┌───┐     ┌───┐\n│ d │ ◀── │ a │ ◀┐\n└───┘     └───┘  │\n  │         │    │\n  ▼         ▼    │\n┌───┐     ┌───┐  │\n│ e │     │ c │  │\n└───┘     └───┘  │\n            │    │\n            ▼    │\n          ┌───┐  │\n          │ b │ ─┘\n          └───┘\n```\n",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/rtsao/scc.git"
  },
  "bugs": {
    "url": "https://github.com/rtsao/scc/issues"
  },
  "license": "MIT",
  "versions": {
    "1.0.0": {
      "name": "@rtsao/scc",
      "version": "1.0.0",
      "repository": {
        "type": "git",
        "url": "git+https://github.com/rtsao/scc.git"
      },
      "main": "index.js",
      "license": "MIT",
      "gitHead": "6f1e9018758bac4ae9c0facd72265e6633c59de1",
      "description": "Find strongly connected components of a directed graph using Tarjan's algorithm.",
      "bugs": {
        "url": "https://github.com/rtsao/scc/issues"
      },
      "homepage": "https://github.com/rtsao/scc#readme",
      "_id": "@rtsao/scc@1.0.0",
      "_npmVersion": "5.6.0",
      "_nodeVersion": "8.9.0",
      "_npmUser": {
        "name": "rtsao",
        "email": "ryan.j.tsao@gmail.com"
      },
      "dist": {
        "integrity": "sha512-1t/+dgDJpAdqURTl+YIlv9vV4mBakOAgW/TrZpqIRSQoOH7yQxDzkIUJIjFVEIh79UCDCsEjcwU+1Kn/xusp4g==",
        "shasum": "fe33974e74d31ac5bed4f427d843364aebabd5ab",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/@rtsao/scc/-/scc-1.0.0.tgz",
        "fileCount": 5,
        "unpackedSize": 2914,
        "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJctLOxCRA9TVsSAnZWagAA4t0P/A/ZMeQZp+Zuyq3BSX4/\nE8IUEiaPZ1K8vi2dHkJAtg1q83nPi9Pmf4e3KH6teMmOAmYsSdl5pOhKma+5\noPXHZpll+vv+7aYw+0nnVM0QHzotxVNezRXGvvQTgPkvOjtDK7MMugWSBjA5\n5zVobwAkZJws87bQn0mDIA+8MHTV0estZauqZ0PJry3l8k0qL7rik2/kvOrE\nBoaPUHbPyjvXnZAZER2e/Qtmuhpp2JwmY+svU5xbE970p4oLBp13NcwBZxM6\n40Z3h1YaxuEaFvyNkNZA+9oZE1Z2pG/vU9fZbEgiOW8Kn5ySu9W4946NNb4z\nBtwDlVC3S10+Mg924p/2u+M3QAH9Wxfv4yEcpd7PyWj3Yh5tbLwUIus1jKvu\nLaGCuilHlLDMDdDRPCR4kcODADCzHuOcVUxZ9d9h4AQo8gvtqZL8ru+AlRuR\nx0PMkAL49gJrUzHqB42/PN6jPtRX4iwK1ag7luIKse4Foqkr3jCLYuhjC8WQ\nhLMWEP1q8O7J9OydFExEwyvFfOp2OElnCKKpBEE6Sx3OSqJYtjR2YePvlJzv\npWGR+7jgt/jH+MBor1jyU8PKvlWIfvlmSems4wfeD968voY0cvI4WBEA7Tq3\n3M/UQHVphP6vsjwKQeDj6jnxPsiSaRnVmAv5PYBRKa8MIXczHUXSlHAaYRgs\ngtTb\r\n=g3kO\r\n-----END PGP SIGNATURE-----\r\n",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIFzAZFFf/Wr0Cy+0k9Jv7gZaqhC5uO4eavS3lV5kfRonAiEA1gZwRuVD9B0z5RpIo4Aiu4yfX/a6ypLXS5+I/9lYNt8="
          }
        ]
      },
      "maintainers": [
        {
          "name": "rtsao",
          "email": "ryan.j.tsao@gmail.com"
        }
      ],
      "directories": {},
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/scc_1.0.0_1555346352921_0.23059262953909054"
      },
      "_hasShrinkwrap": false
    },
    "1.1.0": {
      "name": "@rtsao/scc",
      "version": "1.1.0",
      "repository": {
        "type": "git",
        "url": "git+https://github.com/rtsao/scc.git"
      },
      "main": "index.js",
      "license": "MIT",
      "gitHead": "1120edc92040b0ca748ab62a882a98565c85deed",
      "description": "Find strongly connected components of a directed graph using [Tarjan's algorithm](https://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm).",
      "bugs": {
        "url": "https://github.com/rtsao/scc/issues"
      },
      "homepage": "https://github.com/rtsao/scc#readme",
      "_id": "@rtsao/scc@1.1.0",
      "_nodeVersion": "14.10.1",
      "_npmVersion": "7.18.1",
      "dist": {
        "integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==",
        "shasum": "927dd2fae9bc3361403ac2c7a00c32ddce9ad7e8",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/@rtsao/scc/-/scc-1.1.0.tgz",
        "fileCount": 6,
        "unpackedSize": 3611,
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEYCIQDM/VgostUA7JQ4ls21v2V1wmAUSso2hgvqHZsUwvhpUwIhANjKSY3m/wk3011dDbO6TueU9aAz764vHI9hp4JUJBFE"
          }
        ],
        "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiTcjYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrnAA/8CVSDMeQ2gPuL16pPCker5EMMfm4SkL6EgEsErZX1momfXzwj\r\nuHFID5/zTKc31W9/+CB1oEeACE4/wTNuoCAChXc2lyCO1QP9khqSF2D+b3l+\r\nlYH1summQvLjQJsVUR5OkyORBdkNmoeMyIgGEpE9zzxH5MDl13bDfvPggnEa\r\novIf8JBOUU7UeuIVaTUs7JQiV8q8+vwQjz4eJrgR2/PCQBTNeIesoz2u5o+k\r\nOhIzqPHQKoMoSFf/0a6nkk6PQfkaNwrKwmX5jQDrUUcYbRFLuiwvxnO5b2on\r\nCnlvHG+FAU5LIlpXPClBBX7MNRgcT3ZPhWFWSqezHi3cQiRVST7AL56RuUcf\r\n6wMGduW43SQ1YmH1P+c8w0BlrZeOPnh00HcdYXauJyUhh7bX8NzoPGlxic3j\r\n6nBsiSuNf2c2y/JejeZ8/1fR6WB4jMtwHVMwlTIK8ISrQODXF2DuybMSS15s\r\nizwvg9u3uPPfuAyT1XP1GJa0DefU4wlt4xEiS4l+j+7AvCJWzJYcyTJ8K/V4\r\nelQ5d3ArKG52eoUIGARLH23wZ1S0XOXJIcxM9zKGNJ9LvMa2TDsnYDFzli7q\r\ndEHdnbWfzd/z7Xgcso25D77aQDSovJRy5HvSnq4MJK6UcP1esnLt8QSyRxcJ\r\nem/5GzCr4vEBsec54TM2bUhPJGAEb0Pej40=\r\n=nlZA\r\n-----END PGP SIGNATURE-----\r\n"
      },
      "_npmUser": {
        "name": "rtsao",
        "email": "ryan.j.tsao@gmail.com"
      },
      "directories": {},
      "maintainers": [
        {
          "name": "rtsao",
          "email": "ryan.j.tsao@gmail.com"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/scc_1.1.0_1649264856486_0.13558468231049892"
      },
      "_hasShrinkwrap": false
    }
  },
  "name": "@rtsao/scc",
  "time": {
    "created": "2019-04-15T16:39:12.732Z",
    "1.0.0": "2019-04-15T16:39:13.021Z",
    "modified": "2026-05-13T06:54:56.648Z",
    "1.1.0": "2022-04-06T17:07:36.584Z"
  },
  "readmeFilename": "README.md",
  "homepage": "https://github.com/rtsao/scc#readme"
}