1.0.2 • Published 6 years ago

is-async-iterable v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

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