MCPcopy Create free account
hub / github.com/Effect-TS/effect / transformValue

Function transformValue

packages/effect/src/unstable/sql/Statement.ts:1141–1151  ·  view source on GitHub ↗
(value: any)

Source from the content-addressed store, hash-verified

1139 nested = true
1140) => {
1141 const transformValue = (value: any) => {
1142 if (Array.isArray(value)) {
1143 if (value.length === 0 || value[0].constructor !== Object) {
1144 return value
1145 }
1146 return array(value)
1147 } else if (value?.constructor === Object) {
1148 return transformObject(value)
1149 }
1150 return value
1151 }
1152
1153 const transformObject = (obj: Record<string, any>): any => {
1154 const newObj: Record<string, any> = {}

Callers 4

onCustomFunction · 0.85
onCustomFunction · 0.85
transformObjectFunction · 0.85
transformArrayNestedFunction · 0.85

Calls 2

arrayFunction · 0.85
transformObjectFunction · 0.85

Tested by

no test coverage detected