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

Function toNativeStyle

packages/utils/src/css-helper.ts:61–82  ·  view source on GitHub ↗
(runtime: Record<string, string> | undefined)

Source from the content-addressed store, hash-verified

59}
60
61function toNativeStyle(runtime: Record<string, string> | undefined) {
62 if (!runtime) {
63 return {};
64 }
65 if (runtime.default) {
66 const normalized: Record<string, string> = {};
67 Object.keys(runtime).forEach((pseudo) => {
68 if (pseudo === 'extra') {
69 normalized[pseudo] = runtime[pseudo];
70 return;
71 }
72 normalized[pseudo] = toNativeStyle(runtime[pseudo]);
73 });
74 return normalized;
75 }
76
77 const normalized = {};
78 Object.keys(runtime).forEach((key) => {
79 normalized[camelize(key)] = runtime[key];
80 });
81 return normalized;
82}
83
84function normalizeStyle(style) {
85 if (!style) {

Callers 1

cssToStyleFunction · 0.85

Calls 2

camelizeFunction · 0.70
forEachMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…