checkInto

tcmts.cli.main.checkInto · #7j6znfhn · term · runs anywhere

import { IDENT_PATH } from "#codebase/tcmts/cli/codebase";
import { UsageError } from "#codebase/tcmts/cli/ui";

export function checkInto(into: string | undefined): string | undefined {
  if (into !== undefined && into !== "" && !IDENT_PATH.test(into)) throw new UsageError(`'${into}' is not a valid namespace`);
  return into;
}

uses

used by