(v: string | any, locale: string = 'zh-CN')
| 30 | } |
| 31 | |
| 32 | export function convertToI18NObject(v: string | any, locale: string = 'zh-CN') { |
| 33 | if (isI18NObject(v)) return v; |
| 34 | return { type: 'i18n', use: locale, [locale]: v }; |
| 35 | } |
| 36 | |
| 37 | export function isString(v: any): v is string { |
| 38 | return typeof v === 'string'; |
no test coverage detected
searching dependent graphs…