Skip to content

Commit

Permalink
refactor: simplified getType
Browse files Browse the repository at this point in the history
  • Loading branch information
Varun0157 committed Jun 20, 2024
1 parent 85ffe2f commit 4e11183
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/runTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,7 @@ function testRecursiveTests(
}

function getType(data: any): string {
if (data === null) {
return "null";
} else if (Array.isArray(data)) {
return "array";
} else {
return typeof data;
}
if (data === null) return "null";
if (Array.isArray(data)) return "array";
return typeof data;
}

0 comments on commit 4e11183

Please sign in to comment.