Skip to content

Commit 4d2bddf

Browse files
committed
update thenable
1 parent 39f0f27 commit 4d2bddf

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/lib/is-thenable.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
* Check if thenable
33
* (instanceof Promise doesn't respect realms)
44
*/
5-
export const isThenable = (value: unknown) =>
6-
Boolean(
7-
typeof value === 'object' &&
8-
value !== null &&
9-
'then' in value &&
10-
typeof (value as any).then === 'function'
11-
)
5+
export const isThenable = (value: unknown): boolean =>
6+
typeof value === 'object' &&
7+
value !== null &&
8+
'then' in value &&
9+
typeof (value as any).then === 'function'

0 commit comments

Comments
 (0)