Metakit / API

@doeixd/metakit/graph/match

Minimal path-matching helpers (@doeixd/metakit/graph/match).

Browser code such as foldkit-surface/writes can match written paths against read paths at view-definition time. The MetaKit dependencies are path.ts and its node representation, with no partial evaluation or SQL.

Functions

affectedTagsGiven a record of transition footprints { [Tag]: { writes } } and a reader's reads (Option.none() when unknown), return the tags whose writes can affect…
coversTrue when every concrete path candidate matches, cover matches too: a segment of cover matches * or the same segment, and * in candidate is covered only by…
minimizePathsDeduplicate and minimize a list of paths: ['account'] subsumes ['account', 'balance'], and ['todos', '*'] subsumes ['todos', '0', 'title']. A concrete…
pathsOverlapTrue when a and b overlap in either direction (a is a prefix of b or b of a).
writesOverlapReadsWhether a transition's writes can affect a reader with reads.