Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

411 B
Raw Blame
export function visitRecords(
  value: unknown,
  callback: (record: Record<string, unknown>) => void,
) {
  if (!value || typeof value !== "object") return;
  if (Array.isArray(value)) {
    for (const item of value) visitRecords(item, callback);
    return;
  }
  const record = value as Record<string, unknown>;
  callback(record);
  for (const item of Object.values(record)) visitRecords(item, callback);
}