MCPcopy Index your code
hub / github.com/alibaba/lowcode-engine / getStaticExprValue

Function getStaticExprValue

modules/code-generator/src/utils/common.ts:39–43  ·  view source on GitHub ↗
(expr: string)

Source from the content-addressed store, hash-verified

37}
38
39export function getStaticExprValue<T>(expr: string): T {
40 // TODO: 需要安全性检查
41 // eslint-disable-next-line no-new-func
42 return Function(`"use strict";return (${expr})`)();
43}
44
45export function isJSExpressionFn(data: any): data is IPublicTypeJSFunction {
46 return data?.type === 'JSExpression' && data?.extType === 'function';

Callers 2

generateAttrFunction · 0.90
generateNodeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…