MCPcopy Index your code
hub / github.com/callumalpass/tasknotes / normalizeRuntimeOperator

Function normalizeRuntimeOperator

src/api/TaskNotesAPI.ts:3056–3065  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

3054}
3055
3056function normalizeRuntimeOperator(value: unknown): TaskNotesRuntimeOperator | null {
3057 if (typeof value !== "string") return null;
3058 const normalized = value.trim();
3059 const exact = RUNTIME_OPERATOR_BY_ALIAS.get(normalized);
3060 if (exact) return exact;
3061 if ((TASKNOTES_RUNTIME_QUERY_OPERATORS as readonly string[]).includes(normalized)) {
3062 return normalized as TaskNotesRuntimeOperator;
3063 }
3064 return null;
3065}
3066
3067function runtimeOperatorRequiresValue(operator: TaskNotesRuntimeOperator): boolean {
3068 return !["exists", "missing", "isTrue", "isFalse"].includes(operator);

Callers 2

Calls 1

getMethod · 0.65

Tested by

no test coverage detected