UNPKG

@typed/content-hash

Version:

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

12 lines (9 loc) 288 B
import { pipe } from 'fp-ts/function' import { uniq } from 'fp-ts/ReadonlyArray' import { DiGraph } from './DiGraph' export function addVertice<A>(vertice: A, graph: DiGraph<A>): DiGraph<A> { return { ...graph, vertices: pipe([...graph.vertices, vertice], uniq(graph)), } }