UNPKG

@typed/content-hash

Version:

Content hash a directory of HTML/JS/CSS files and other static assets

9 lines (6 loc) 370 B
import { ReadonlyNonEmptyArray } from 'fp-ts/ReadonlyNonEmptyArray' import { DiGraph } from './DiGraph' import { getStronglyConnectedComponents } from './getStronglyConnectedComponents' export function getCircularDependencies<A>(graph: DiGraph<A>): ReadonlyArray<ReadonlyNonEmptyArray<A>> { return getStronglyConnectedComponents(graph).filter((x) => x.length > 1) }