Skip to content

Commit

Permalink
fix: Update packages and fix TSC
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavoguichard committed Mar 18, 2024
1 parent 9102d83 commit dcbf44c
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 14 deletions.
20 changes: 10 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "latest",
"@vitest/coverage-v8": "^1.0.2",
"@vitest/coverage-v8": "^1.4.0",
"eslint": "latest",
"prettier": "latest",
"tsup": "latest",
"typescript": "^5.1.6",
"typescript": "^5.4.2",
"vitest": "latest"
},
"files": [
Expand Down
5 changes: 4 additions & 1 deletion src/utils/word-case/capitalize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@ import { toUpperCase } from '../../native/to-upper-case.js'
* @example capitalize('hello world') // 'Hello world'
*/
export function capitalize<T extends string>(str: T) {
return join([toUpperCase(charAt(str, 0)), slice(str, 1)]) as Capitalize<T>
return join([
toUpperCase(charAt(str, 0) ?? ''),
slice(str, 1),
]) as Capitalize<T>
}
5 changes: 4 additions & 1 deletion src/utils/word-case/uncapitalize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@ import { toLowerCase } from '../../native/to-lower-case.js'
* @example uncapitalize('Hello world') // 'hello world'
*/
export function uncapitalize<T extends string>(str: T) {
return join([toLowerCase(charAt(str, 0)), slice(str, 1)]) as Uncapitalize<T>
return join([
toLowerCase(charAt(str, 0) ?? ''),
slice(str, 1),
]) as Uncapitalize<T>
}

0 comments on commit dcbf44c

Please sign in to comment.