UNPKG

@promptbook/utils

Version:

Promptbook: Run AI apps in plain human language across multiple models and platforms

21 lines (20 loc) 797 B
import type { BookCommitment } from '../_base/BookCommitment'; /** * Generates a regex pattern to match a specific commitment * * Note: It always creates new Regex object * Note: Uses word boundaries to ensure only full words are matched (e.g., "PERSONA" matches but "PERSONALITY" does not) * * @private */ export declare function createCommitmentRegex(commitment: BookCommitment): RegExp; /** * Generates a regex pattern to match a specific commitment type * * Note: It just matches the type part of the commitment * Note: It always creates new Regex object * Note: Uses word boundaries to ensure only full words are matched (e.g., "PERSONA" matches but "PERSONALITY" does not) * * @private */ export declare function createCommitmentTypeRegex(commitment: BookCommitment): RegExp;