Skip to content

Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.

293 B
Raw Blame
/** Build a pattern for literal text with optional start/end anchoring. */
export function literalPattern(value, { start = false, end = false } = {}) {
    const escaped = value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
    return new RegExp(`${start ? '^' : ''}${escaped}${end ? '$' : ''}`);
}