dynamic-content-html
Version:
A dynamic content html processing library for template interpolation with rich content support
23 lines • 1.1 kB
TypeScript
import { DynamicTextOptions, DynamicTextConfig, MJMLOptions, MJMLConfig } from './types';
/**
* Extract variables from template string using custom format
*/
export declare function extractVariables(template: string, config?: DynamicTextConfig): string[];
/**
* Get nested property value from object using dot notation
*/
export declare function getNestedValue(obj: any, path: string): any;
/**
* Replace variables in template with values from options using custom format
*/
export declare function replaceVariables(template: string, options: DynamicTextOptions, config?: DynamicTextConfig): string;
/**
* Process rich content with HTML functions using custom format
*/
export declare function processRichContent(template: string, options: DynamicTextOptions, richFunctions: Record<string, (chunks: string) => string>, config?: DynamicTextConfig): string;
/**
* Process MJML content with dynamic data
* Handles both MJML attributes and text content
*/
export declare function processMJML(template: string, options?: MJMLOptions, config?: MJMLConfig): string;
//# sourceMappingURL=utils.d.ts.map