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

Function areValuesEqual

src/api/TaskNotesAPI.ts:3411–3430  ·  view source on GitHub ↗
(before: unknown, after: unknown)

Source from the content-addressed store, hash-verified

3409}
3410
3411function areValuesEqual(before: unknown, after: unknown): boolean {
3412 if (Object.is(before, after)) {
3413 return true;
3414 }
3415
3416 if (
3417 typeof before !== "object" ||
3418 before === null ||
3419 typeof after !== "object" ||
3420 after === null
3421 ) {
3422 return false;
3423 }
3424
3425 try {
3426 return JSON.stringify(before) === JSON.stringify(after);
3427 } catch {
3428 return false;
3429 }
3430}
3431
3432function getActiveTimeEntryCount(task: TaskInfo): number {
3433 return (task.timeEntries ?? []).filter((entry) => !entry.endTime).length;

Callers 2

normalizeUpdatedEventMethod · 0.85
buildTaskChangesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected