UNPKG

436 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.isAcyclic = void 0;
4const topsort_1 = require("./topsort");
5function isAcyclic(g) {
6 try {
7 (0, topsort_1.topsort)(g);
8 }
9 catch (e) {
10 if (e instanceof topsort_1.CycleException) {
11 return false;
12 }
13 throw e;
14 }
15 return true;
16}
17exports.isAcyclic = isAcyclic;
18//# sourceMappingURL=is-acyclic.js.map
\No newline at end of file