UNPKG

@voiceflow/common

Version:

Junk drawer of utility functions

25 lines 1.26 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>, options?: { modifier?: (variable: unknown) => unknown; trim?: boolean; keepTypeIfOnlyVariable?: false; }): string; export declare function replaceVariables(phrase: string | undefined | null, variables: Record<string, unknown>, options: { modifier?: (variable: unknown) => unknown; 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>, options?: { trim?: boolean; modifier?: (variable: unknown) => unknown; keepTypeIfOnlyVariable?: boolean; }) => T; //# sourceMappingURL=variables.d.ts.map