INNER CODE UNIT · TypeScript

m

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

        m = /\bline\s+(\d+),?\s+column\s+(\d+)/i.exec(msg);
        if (m) return { line: +m[1], column: +m[2] };
        return null;
    }
}

// Emit an error in x-cmd's log format so it integrates with the rest of
// the toolchain.  Metadata is rendered as siblings of the main message
// (no `more:` block) so it stays easy to grep / pipe.
function logError(msg: string, meta?: Record<string, string>): void {
    console.error(`- E|ajv: ${msg}`);
    if (meta) {
        for (const [k, v] of Object.entries(meta)) {
            console.error(`  ${k}: ${v}`);
        }
    }
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…