string* takes in String (class) inputs (#732)

This commit is contained in:
Jaco Greeff
2020-10-28 13:52:40 +01:00
committed by GitHub
parent bf28507ae8
commit b51ed71796
13 changed files with 63 additions and 13 deletions
+2 -1
View File
@@ -15,7 +15,8 @@
* stringLowerFirst('ABC'); // => 'aBC'
* ```
*/
export default function stringLowerFirst (value?: string | null): string {
// eslint-disable-next-line @typescript-eslint/ban-types
export default function stringLowerFirst (value?: string | String | null): string {
return value
? value.charAt(0).toLowerCase() + value.slice(1)
: '';