Add is.asyncFunction (#20)

This commit is contained in:
Brandon Smith 2017-10-15 23:29:10 -04:00 committed by Sindre Sorhus
parent 04cb80dfb1
commit dc3b6ff86b
3 changed files with 27 additions and 2 deletions

View file

@ -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)