Skip to content

Commit 98a87ac

Browse files
committed
clarify variable name, add docstring for isBuiltin
1 parent 118b99f commit 98a87ac

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

packages/utils/src/is.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,15 @@ export function isError(wat: unknown): wat is Error {
2323
return isInstanceOf(wat, Error);
2424
}
2525
}
26-
27-
function isBuiltin(wat: unknown, ty: string): boolean {
28-
return objectToString.call(wat) === `[object ${ty}]`;
26+
/**
27+
* Checks whether given value is an instance of the given built-in class.
28+
*
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}]`;
2935
}
3036

3137
/**

0 commit comments

Comments
 (0)