Async array methods in JavaScript
MIT License
This repository contains the asynchronous version of most array methods in JavaScript.
First install or download this repository.
npm i async-array-prototype
# or
yarn add async-array-prototype
Then either import the whole package or include a new script tag with src
pointing to your downloaded and extracted repository.
You can also include the whole package from unpkg.com
<script src="https://unpkg.com/async-array-prototype"></script>
Then
import 'async-array';
Once imported, the asyncronous methods are available on the Array.prototype
and you can use them with any array.
every
filter
find
findIndex
forEach
map
some
reduce
Of course you can live on the edge and use the raw ES7 version of the methods by importing them from the lib
folder.
This way you will not extend the array prototype and the actual usage is left to you.
MIT