We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
isBuiltin
1 parent 118b99f commit 98a87acCopy full SHA for 98a87ac
packages/utils/src/is.ts
@@ -23,9 +23,15 @@ export function isError(wat: unknown): wat is Error {
23
return isInstanceOf(wat, Error);
24
}
25
26
-
27
-function isBuiltin(wat: unknown, ty: string): boolean {
28
- return objectToString.call(wat) === `[object ${ty}]`;
+/**
+ * Checks whether given value is an instance of the given built-in class.
+ *
29
+ * @param wat The value to be checked
30
+ * @param className
31
+ * @returns A boolean representing the result.
32
+ */
33
+function isBuiltin(wat: unknown, className: string): boolean {
34
+ return objectToString.call(wat) === `[object ${className}]`;
35
36
37
/**
0 commit comments