Skip to content

Commit addb6fc

Browse files
committed
update
1 parent 4780206 commit addb6fc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/runtime/src/client/functions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { invariant, capitalize, uncapitalize } from '@zenstackhq/common-helpers';
1+
import { invariant, lowerCaseFirst, upperCaseFirst } from '@zenstackhq/common-helpers';
22
import { sql, ValueNode, type Expression, type ExpressionBuilder } from 'kysely';
33
import { match } from 'ts-pattern';
44
import type { ZModelFunction, ZModelFunctionContext } from './options';
@@ -132,8 +132,8 @@ function processCasing(casing: Expression<any>, result: string, model: string) {
132132
.with('original', () => model)
133133
.with('upper', () => result.toUpperCase())
134134
.with('lower', () => result.toLowerCase())
135-
.with('capitalize', () => capitalize(result))
136-
.with('uncapitalize', () => uncapitalize(result))
135+
.with('capitalize', () => upperCaseFirst(result))
136+
.with('uncapitalize', () => lowerCaseFirst(result))
137137
.otherwise(() => {
138138
throw new Error(
139139
`Invalid casing value: ${opNode.value}. Must be "original", "upper", "lower", "capitalize", or "uncapitalize".`,

0 commit comments

Comments
 (0)