MCPcopy Create free account
hub / github.com/Easy-Editor/EasyEditor / getRuntimeValueFromConfig

Function getRuntimeValueFromConfig

packages/plugin-datasource/src/utils.ts:71–81  ·  view source on GitHub ↗
(type: string, value: CompositeValue, context: IDataSourceRuntimeContext)

Source from the content-addressed store, hash-verified

69}
70
71export const getRuntimeValueFromConfig = (type: string, value: CompositeValue, context: IDataSourceRuntimeContext) => {
72 if (value === undefined) {
73 return undefined
74 }
75
76 if (isJSExpression(value) || isJSFunction(value)) {
77 return getRuntimeBaseValue(type, getRuntimeJsValue(value, context))
78 }
79
80 return value
81}
82
83export const buildJsonObj = (params: JSONObject | JSExpression, context: IDataSourceRuntimeContext) => {
84 if (isJSExpression(params)) {

Callers 2

adapt2RuntimeFunction · 0.90
buildOptionsFunction · 0.85

Calls 4

isJSExpressionFunction · 0.90
isJSFunctionFunction · 0.90
getRuntimeBaseValueFunction · 0.85
getRuntimeJsValueFunction · 0.85

Tested by

no test coverage detected