@promptbook/vercel
Version:
Promptbook: Turn your company's scattered knowledge into AI ready books
21 lines (20 loc) • 907 B
TypeScript
import type { BookCommitment } from '../../commitments/_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 - TODO: [🧠] Maybe should be public?
*/
export declare function createCommitmentRegex(commitment: BookCommitment, aliases?: 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, aliases?: BookCommitment[]): RegExp;