docx-validate
    Preparing search index...

    Function runCli

    • Run fn if metaUrl (always pass import.meta.url) refers to the process's entry point. The result of fn is treated as the desired exit code; thrown errors are logged to stderr and exit 1.

      Use this at the bottom of every script — never call process.exit directly inside main; just return a number.

      Parameters

      • metaUrl: string
      • fn: () => number | Promise<number>

      Returns void