UNPKG

@ohayojp/util

Version:

Universal toolset of ohayojp.

12 lines (11 loc) 408 B
import { NzSafeAny } from 'ng-zorro-antd/core/types'; /** * 字符串格式化 * ``` * format('this is ${name}', { name: 'asdf' }) * // output: this is asdf * format('this is ${user.name}', { user: { name: 'asdf' } }, true) * // output: this is asdf * ``` */ export declare function format(str: string | null | undefined, obj: NzSafeAny | null | undefined, needDeepGet?: boolean): string;