We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cc65ee5 commit 30482b2Copy full SHA for 30482b2
src/utils/kindOf.ts
@@ -3,7 +3,7 @@ export function miniKindOf(val: any): string {
3
if (val === void 0) return 'undefined'
4
if (val === null) return 'null'
5
6
- let type = typeof val
+ const type = typeof val
7
switch (type) {
8
case 'boolean':
9
case 'string':
@@ -30,7 +30,11 @@ export function miniKindOf(val: any): string {
30
}
31
32
// other
33
- return Object.prototype.toString.call(val).slice(8, -1).toLowerCase().replace(/\s/g, '')
+ return Object.prototype.toString
34
+ .call(val)
35
+ .slice(8, -1)
36
+ .toLowerCase()
37
+ .replace(/\s/g, '')
38
39
40
function ctorName(val: any): string | null {
0 commit comments