MCPcopy Index your code
hub / github.com/TanStack/form / concatenatePaths

Function concatenatePaths

packages/form-core/src/utils.ts:193–207  ·  view source on GitHub ↗
(path1: string, path2: string)

Source from the content-addressed store, hash-verified

191 * @private
192 */
193export function concatenatePaths(path1: string, path2: string): string {
194 if (path1.length === 0) return path2
195 if (path2.length === 0) return path1
196
197 if (path2.startsWith('[')) {
198 return path1 + path2
199 }
200
201 // In cases where parent and child withFieldGroup forms are both nested
202 if (path2.startsWith('.')) {
203 return path1 + path2
204 }
205
206 return `${path1}.${path2}`
207}
208
209/**
210 * @private

Callers 2

FieldGroupApiClass · 0.90
utils.spec.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected