add docs for .asyncGenerator and .asyncGeneratorFunction

This commit is contained in:
forresst 2019-12-27 08:22:21 +01:00
parent b90db352a3
commit 2c057a8c63

View file

@ -116,6 +116,38 @@ is.asyncFunction(() => {});
// => false
```
##### .asyncGenerator(value)
```js
is.asyncGenerator(
(async function * () {
yield 4;
})()
);
// => true
is.asyncGenerator(
(function * () {
yield 4;
})()
);
// => false
```
##### .asyncGeneratorFunction(value)
```js
is.asyncGeneratorFunction(async function * () {
yield 4;
});
// => true
is.asyncGeneratorFunction(function * () {
yield 4;
});
// => false
```
##### .boundFunction(value)
Returns `true` for any `bound` function.