UNPKG

@voiceflow/common

Version:

Junk drawer of utility functions

19 lines 1.14 kB
export declare const variableReplacer: (match: string, inner: string, variables: Record<string, unknown>, modifier?: (variable: unknown) => unknown) => unknown; export declare const splitVariableName: (inner: string, options?: { pathWithDotPrefix: boolean; }) => { id: string; path: string; }; export declare function replaceVariables(phrase: string | undefined | null, variables: Record<string, unknown>, modifier?: (variable: unknown) => unknown, options?: { trim?: boolean; keepTypeIfOnlyVariable?: false; }): string; export declare function replaceVariables(phrase: string | undefined | null, variables: Record<string, unknown>, modifier?: (variable: unknown) => unknown, options?: { trim?: boolean; keepTypeIfOnlyVariable: true; }): unknown; export declare const sanitizeVariables: (variables: Record<string, unknown>) => Record<string, unknown>; export declare const transformStringVariableToNumber: (str: string | number | null) => number | string | null; export declare const deepVariableSubstitution: <T>(bodyData: T, variableMap: Record<string, unknown>) => T; //# sourceMappingURL=variables.d.ts.map