Add is.asyncFunction (#20)
This commit is contained in:
parent
04cb80dfb1
commit
dc3b6ff86b
3 changed files with 27 additions and 2 deletions
12
readme.md
12
readme.md
|
|
@ -84,6 +84,18 @@ Returns `true` for any object that implements its own `.next()` and `.throw()` m
|
|||
|
||||
##### .generatorFunction(value)
|
||||
|
||||
##### .asyncFunction(value)
|
||||
|
||||
Returns `true` for any `async` function that can be called with the `await` operator.
|
||||
|
||||
```js
|
||||
is.asyncFunction(async () => {});
|
||||
// => true
|
||||
|
||||
is.asyncFunction(() => {});
|
||||
// => false
|
||||
```
|
||||
|
||||
##### .map(value)
|
||||
##### .set(value)
|
||||
##### .weakMap(value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue