MCPcopy Create free account
hub / github.com/alibaba/lowcode-engine / isUseI18NSetter

Function isUseI18NSetter

packages/utils/src/misc.ts:22–30  ·  view source on GitHub ↗
(prototype: any, propName: string)

Source from the content-addressed store, hash-verified

20}
21
22export function isUseI18NSetter(prototype: any, propName: string) {
23 const configure = prototype?.options?.configure;
24 if (Array.isArray(configure)) {
25 return configure.some(c => {
26 return c.name === propName && c?.setter?.type?.displayName === 'I18nSetter';
27 });
28 }
29 return false;
30}
31
32export function convertToI18NObject(v: string | any, locale: string = 'zh-CN') {
33 if (isI18NObject(v)) return v;

Callers 1

misc.test.tsFile · 0.90

Calls 1

someMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…