INNER CODE UNIT · TypeScript

bumpStats

x-cmd/x-cmd · mod/ajv/lib/ajv.ts:289

function bumpStats(result: string, format: string | null): void {
    STATS.total++;
    STATS.result[collapseResult(result)]++;
    if (format !== null) STATS.format[format]++;
}

function emitSummary(): void {
    if (STATS.total === 0) return;
    const lines: string[] = [
        "---",
        `total: ${STATS.total}`,
        "result:",
        `  success: ${STATS.result.success}`,
        `  syntax-error: ${STATS.result["syntax-error"]}`,
        `  schema-error: ${STATS.result["schema-error"]}`,
        "format:",
        `  json: ${STATS.format.json}`,
        `  yml: ${STATS.format.yml}`,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…