{"id":15894636,"url":"https://github.com/clayrisser/trailduck","last_synced_at":"2025-03-20T14:31:09.029Z","repository":{"id":57378837,"uuid":"151020137","full_name":"clayrisser/trailduck","owner":"clayrisser","description":"a topological cyclic sorting algorithm based on depth-first search (dfs)","archived":false,"fork":false,"pushed_at":"2023-07-12T10:25:30.000Z","size":1303,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-12T19:40:51.582Z","etag":null,"topics":["algorithm","depth-first-search","dfs","directec","first","graph","search","sort","sorting","topological","topological-sort"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clayrisser.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-01T00:39:41.000Z","updated_at":"2023-07-10T05:36:49.000Z","dependencies_parsed_at":"2024-10-06T08:40:56.573Z","dependency_job_id":"f832d444-cfa8-4903-b9b0-8a789e8fc656","html_url":"https://github.com/clayrisser/trailduck","commit_stats":null,"previous_names":["codejamninja/trailduck"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clayrisser%2Ftrailduck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clayrisser%2Ftrailduck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clayrisser%2Ftrailduck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clayrisser%2Ftrailduck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clayrisser","download_url":"https://codeload.github.com/clayrisser/trailduck/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244630103,"owners_count":20484312,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithm","depth-first-search","dfs","directec","first","graph","search","sort","sorting","topological","topological-sort"],"created_at":"2024-10-06T08:40:47.047Z","updated_at":"2025-03-20T14:31:08.741Z","avatar_url":"https://github.com/clayrisser.png","language":"JavaScript","funding_links":["https://liberapay.com/codejamninja/donate"],"categories":[],"sub_categories":[],"readme":"# trailduck\n\n[![GitHub stars](https://img.shields.io/github/stars/codejamninja/trailduck.svg?style=social\u0026label=Stars)](https://github.com/codejamninja/trailduck)\n\n\u003e a topological cyclic sorting algorithm based on depth-first search (dfs)\n\nPlease ★ this repo if you found it useful ★ ★ ★\n\n![](assets/trailduck.png)\n\n## Features\n\n* works with cycles in the graph\n* detects overlapping cycles\n* loosly based on depth-first search (dfs)\n\n\n## Installation\n\n```sh\nnpm install --save trailduck\n```\n\n\n## Dependencies\n\n* [NodeJS](https://nodejs.org)\n\n\n## Usage\n\n```js\nconst trailDuck = new TrailDuck({\n  A: {\n    children: ['B', 'D', 'E']\n  },\n  B: { children: ['C'] },\n  C: { children: ['A'] },\n  D: { children: ['E'] },\n  E: { children: ['A'] }\n});\n\nconsole.log('cycles', trailDuck.cycles);\nconsole.log('ordered', trailDuck.ordered);\nconsole.log('tree', trailDuck.tree);\n```\n\n\n## Support\n\nSubmit an [issue](https://github.com/codejamninja/trailduck/issues/new)\n\n\n## Screenshots\n\n[Contribute](https://github.com/codejamninja/trailduck/blob/master/CONTRIBUTING.md) a screenshot\n\n\n## Contributing\n\nReview the [guidelines for contributing](https://github.com/codejamninja/trailduck/blob/master/CONTRIBUTING.md)\n\n\n## License\n\n[MIT License](https://github.com/codejamninja/trailduck/blob/master/LICENSE)\n\n[Jam Risser](https://codejam.ninja) © 2018\n\n\n## Changelog\n\nReview the [changelog](https://github.com/codejamninja/trailduck/blob/master/CHANGELOG.md)\n\n\n## Credits\n\n* [Jam Risser](https://codejam.ninja) - Author\n\n\n## Support on Liberapay\n\nA ridiculous amount of coffee ☕ ☕ ☕ was consumed in the process of building this project.\n\n[Add some fuel](https://liberapay.com/codejamninja/donate) if you'd like to keep me going!\n\n[![Liberapay receiving](https://img.shields.io/liberapay/receives/codejamninja.svg?style=flat-square)](https://liberapay.com/codejamninja/donate)\n[![Liberapay patrons](https://img.shields.io/liberapay/patrons/codejamninja.svg?style=flat-square)](https://liberapay.com/codejamninja/donate)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclayrisser%2Ftrailduck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclayrisser%2Ftrailduck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclayrisser%2Ftrailduck/lists"}