New utils

This commit is contained in:
Aleksandr Kraiz
2022-11-28 17:50:20 +04:00
parent 54b6425dc6
commit 1a33c41993
5 changed files with 19 additions and 1 deletions

4
src/utils/toLowerCase.ts Normal file
View File

@@ -0,0 +1,4 @@
export default function toLowerCase<T extends string>(str: T): Lowercase<T> {
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
return str.toLowerCase() as Lowercase<T>;
}