is-async-iterable

1.0.2 • Public • Published

is-async-iterable

Travis Build Status NPM downloads

Checks if a given object is async iterable.

Async iterable fun

This module is part of Async iterable fun, a complete toolset of modules to work with async iterables.

Usage

Check some objects:

const isAsyncIterable = require("is-async-iterable");
async function iter* () {
  yield 1;
  yield 2;
}
 
console.log(isAsyncIterable(iter));
console.log(isAsyncIterable(42));

This will output

true
false

API

isAsyncIterable

Return true if the argument is async iterable

Parameters

  • val any value to check

Returns Boolean true if the value is async iterable

Install

With npm installed, run

npm install --save is-async-iterable

See Also

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i is-async-iterable

Weekly Downloads

0

Version

1.0.2

License

MIT

Last publish

Collaborators

  • parroit