8.0.4 (#1259)
This commit is contained in:
@@ -49,5 +49,17 @@ describe('stringCamelCase', (): void => {
|
||||
).toEqual('dedupKeyPrefix');
|
||||
});
|
||||
|
||||
it('adjusts with leading _', (): void => {
|
||||
expect(
|
||||
stringCamelCase('_reserved')
|
||||
).toEqual('reserved');
|
||||
});
|
||||
|
||||
it('adjusts with minimal chars per part', (): void => {
|
||||
expect(
|
||||
stringCamelCase('_a_b_c_def')
|
||||
).toEqual('aBCDef');
|
||||
});
|
||||
|
||||
performance('stringCamelCase', 64000, randomWords, stringCamelCase);
|
||||
});
|
||||
|
||||
@@ -18,6 +18,7 @@ function converter (fn: (w: string, i: number) => string): (value: AnyString) =>
|
||||
value
|
||||
.toString()
|
||||
.replace(/[-_., ]+/g, ' ')
|
||||
.trim()
|
||||
.split(' ')
|
||||
.map((w, i) =>
|
||||
fn(w[0], i) + (
|
||||
|
||||
Reference in New Issue
Block a user