MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / comparePositioned

Function comparePositioned

packages/plugins/toolkits/src/server.ts:130–137  ·  view source on GitHub ↗
(
  a: Pick<ToolkitPolicyRecord, "id" | "position">,
  b: Pick<ToolkitPolicyRecord, "id" | "position">,
)

Source from the content-addressed store, hash-verified

128 );
129
130const comparePositioned = (
131 a: Pick<ToolkitPolicyRecord, "id" | "position">,
132 b: Pick<ToolkitPolicyRecord, "id" | "position">,
133): number => {
134 if (a.position < b.position) return -1;
135 if (a.position > b.position) return 1;
136 return a.id < b.id ? -1 : a.id > b.id ? 1 : 0;
137};
138
139const blockedPolicy = (pattern = "*"): EffectivePolicy => ({
140 action: "block",

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected