MCPcopy Create free account
hub / github.com/effect-app/libs / sort

Function sort

packages/infra/src/routing/tsort.ts:52–56  ·  view source on GitHub ↗
(dep: readonly (T & { dependsOn?: readonly any[] | undefined })[])

Source from the content-addressed store, hash-verified

50}
51
52export const sort = <T>(dep: readonly (T & { dependsOn?: readonly any[] | undefined })[]): readonly T[] => {
53 const edges = createEdges(dep)
54 const result = tsort(edges)
55 return result.concat(dep.filter((v) => !result.includes(v)))
56}

Callers 3

controller.test.tsFile · 0.85
sortByFunction · 0.85
Chunk.tsFile · 0.85

Calls 3

createEdgesFunction · 0.85
tsortFunction · 0.85
filterMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…