Skip to content

Commit 468aad0

Browse files
committed
chore: use typeof instead of getType()
1 parent c023c18 commit 468aad0

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/toPascalCase.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { capitalize } from './capitalize.js';
2-
import { getType } from './getType.js';
32

43
import type { StringRecord } from './types/records.js';
54
import type { PascalCase } from './types/strings.js';
@@ -10,7 +9,7 @@ export function toPascalCase<Type extends string>(text: Type, customWords?: Stri
109

1110
let fixedWords = words?.map<string>((word) => capitalize(word.replace(/'/g, '')));
1211

13-
if (fixedWords && customWords && getType(customWords) === 'Object') {
12+
if (fixedWords && customWords && typeof customWords === 'object') {
1413
const replacements = new Map(
1514
Object.entries(customWords).map<KeyValueTuple<string, string>>(([key, value]) => [key.toLowerCase(), value]),
1615
);

0 commit comments

Comments
 (0)