Sprinkle in readonly on array inputs (#1568)

This commit is contained in:
Jaco
2022-06-28 10:52:57 +03:00
committed by GitHub
parent 691a8e9b18
commit 3bc62adf6f
11 changed files with 35 additions and 19 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ import type { AnyString } from '../types';
import { CC_TO_LO, CC_TO_UP } from './camelCase';
/** @internal */
function converter (map: string[]): (value?: AnyString | null) => string {
function converter (map: readonly string[]): (value?: AnyString | null) => string {
return (value?: AnyString | null): string =>
value
? map[value.charCodeAt(0)] + value.slice(1)