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

Function getRuntimeBaseValue

packages/plugin-datasource/src/utils.ts:58–69  ·  view source on GitHub ↗
(type: string, value: any)

Source from the content-addressed store, hash-verified

56}
57
58export const getRuntimeBaseValue = (type: string, value: any) => {
59 switch (type) {
60 case 'string':
61 return `${value}`
62 case 'boolean':
63 return typeof value === 'string' ? transformBoolStr(value as string) : !!value
64 case 'number':
65 return Number(value)
66 default:
67 return value
68 }
69}
70
71export const getRuntimeValueFromConfig = (type: string, value: CompositeValue, context: IDataSourceRuntimeContext) => {
72 if (value === undefined) {

Callers 2

buildShouldFetchFunction · 0.85

Calls 1

transformBoolStrFunction · 0.85

Tested by

no test coverage detected