Skip to content

Commit 41768b0

Browse files
committed
style: change paramter name to be more specific
1 parent c0990b0 commit 41768b0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/core/src/shared/utilities/collectionUtils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,20 +305,20 @@ export function assign<T extends Record<any, any>, U extends Partial<T>>(data: T
305305
* @param depth
306306
* @param omitKeys Omit properties matching these names (at any depth).
307307
* @param replacement Replacement for object whose fields extend beyond `depth`, and properties matching `omitKeys`.
308-
* @param maxLength truncates string values that exceed this threshold.
308+
* @param maxStringLength truncates string values that exceed this threshold.
309309
*/
310310
export function partialClone(
311311
obj: any,
312312
depth: number = 3,
313313
omitKeys: string[] = [],
314314
options?: {
315315
replacement?: any
316-
maxLength?: number
316+
maxStringLength?: number
317317
}
318318
): any {
319319
// Base case: If input is not an object or has no children, return it.
320320
if (typeof obj !== 'object' || obj === null || 0 === Object.getOwnPropertyNames(obj).length) {
321-
const maxLength = options?.maxLength
321+
const maxLength = options?.maxStringLength
322322
return typeof obj === 'string' && maxLength !== undefined ? truncate(obj, maxLength, '...') : obj
323323
}
324324

packages/core/src/test/shared/utilities/collectionUtils.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ describe('CollectionUtils', async function () {
780780
},
781781
},
782782
}
783-
assert.deepStrictEqual(partialClone(testObj, 5, [], { maxLength: 2 }), {
783+
assert.deepStrictEqual(partialClone(testObj, 5, [], { maxStringLength: 2 }), {
784784
a: '1',
785785
b: '11',
786786
c: '11...',

0 commit comments

Comments
 (0)