UNPKG

@ctrl/golang-template

Version:
13 lines (12 loc) 763 B
export declare function reReplace(str: string, variables: Record<string, any>): string; export declare function joinReplace(str: string, variables: Record<string, any>): string; export declare function ifElseReplace(str: string, variables: Record<string, any>): string; export declare function rangeReplace(str: string, variables: Record<string, any>): string; export declare function variableReplace(str: string, variables: Record<string, any>): string; export declare function indexReplace(str: string, variables: Record<string, any>): string; /** * Parse template and insert variables * @param str golang style template * @param variables object of variables to insert */ export declare function parse(str: string, variables: Record<string, any>): string;