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

Function stripRelationFilterPaths

packages/infra/src/Store/Memory.ts:25–38  ·  view source on GitHub ↗
(state: readonly FilterResult[], relationPath: string)

Source from the content-addressed store, hash-verified

23export { get } from "./utils.ts"
24
25const stripRelationFilterPaths = (state: readonly FilterResult[], relationPath: string): readonly FilterResult[] => {
26 const prefix = `${relationPath}.-1.`
27 return state.map((entry) =>
28 "path" in entry
29 ? {
30 ...entry,
31 path: entry.path.startsWith(prefix) ? entry.path.slice(prefix.length) : entry.path
32 }
33 : {
34 ...entry,
35 result: stripRelationFilterPaths(entry.result, relationPath)
36 }
37 )
38}
39
40const emptyValueFor = (tag: ComputedProjectionIrExpression["_tag"]) => {
41 switch (tag) {

Callers 1

computeProjectionValueFunction · 0.85

Calls 1

mapMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…