Skip to content

Sykander/iterable-async

Repository files navigation

Iterable Async

Try iterable-async on RunKit Documentation Known Vulnerabilities

A collection of methods for looping iterable objects asynchronously using something similar to the Array api.

Installation

 $ npm install iterable-async

Dependencies

  • None

Supports

  • JavaScript
  • TypeScript

Usage

ES6 Format

const {
	asyncFind,
	asyncFindIndex,
	asyncFilter,
	asyncForEach,
	asyncMap,
	asyncMapSort,
	asyncReduce,
	asyncSort
} = require('iterable-async');

TypeScript Format

import {
	asyncFind,
	asyncFindIndex,
	asyncFilter,
	asyncForEach,
	asyncMap,
	asyncMapSort,
	asyncReduce,
	asyncSort
} from "iterable-async";

Functions

Function Description Wiki
asyncFilter Filter an iterable object asynchronously. wiki
asyncFindIndex Find an item's index in an iterable object asynchronously wiki
asyncFind Find an item in an iterable object asynchronously wiki
asyncForEach Loop over an iterable object asynchronously wiki
asyncMapSort Map an iterable object asynchronously and then resolve when it's sorted, this method is much more efficient than running a regular asyncSort when done with a synchronous comparison function wiki
asyncMap Map an iterable object asynchronously wiki
asyncReduce Reduce an iterable object asynchronously wiki
asyncSort Sort an iterable object asynchronously wiki