Graph.isCycled() method
Whether any path in this graph leads back to where it started.
Signature:
isCycled(): boolean;
Returns:
boolean
true when the graph contains a cycle.
Remarks
Checks from every vertex, so a cycle in a part of the graph nothing else reaches is still found. A self-edge counts. For model associations this is the question that matters: a cycle is an include chain that can be asked to include itself.
Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.