- Go backend (server/)
- Frontend (web/, server/static/)
- Database and deployment files
- Scripts and docs
Co-Authored-By: 狸花猫/Claude-Qwen3.6-Plus 🐾
17 lines
270 B
JavaScript
17 lines
270 B
JavaScript
import topsort, { CycleException } from './topsort';
|
|
|
|
var isAcyclic = function isAcyclic(graph) {
|
|
try {
|
|
topsort(graph);
|
|
} catch (e) {
|
|
if (e instanceof CycleException) {
|
|
return false;
|
|
}
|
|
|
|
throw e;
|
|
}
|
|
|
|
return true;
|
|
};
|
|
|
|
export default isAcyclic; |