INNER CODE UNIT · TypeScript

doesNotRequireAuthentication

karakeep-app/karakeep · apps/cli/src/index.ts:45

function doesNotRequireAuthentication(command: {
  name(): string;
  parent?: unknown;
}) {
  let current: { name(): string; parent?: unknown } | undefined = command;
  while (current) {
    if (current.name() === "auth" || current.name() === "skill") {
      return true;
    }
    current = current.parent as typeof current;
  }
  return false;
}

const program = new Command()
  .name("karakeep")
  .description("A CLI interface to interact with the karakeep api")
  .addOption(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…