{"_id":"p-iteration","_rev":"472637","name":"p-iteration","description":"Make array iteration easy when using async/await and Promises","dist-tags":{"latest":"1.1.8"},"maintainers":[{"name":"antonvs","email":"avs.toka@gmail.com"}],"time":{"modified":"2021-08-05T08:24:44.000Z","created":"2017-06-19T17:15:26.626Z","1.1.8":"2019-03-15T07:39:45.157Z","1.1.7":"2018-05-19T15:00:54.747Z","1.1.5":"2017-07-27T02:50:28.996Z","1.1.4":"2017-07-18T14:45:35.145Z","1.1.3":"2017-07-18T01:37:37.567Z","1.1.2":"2017-07-16T13:43:36.536Z","1.1.1":"2017-06-27T08:55:17.398Z","1.1.0":"2017-06-27T08:45:36.537Z","1.0.1":"2017-06-26T12:15:52.266Z","1.0.0":"2017-06-19T17:15:26.626Z"},"users":{},"author":{"name":"Antonio Valverde"},"repository":{"type":"git","url":"git+https://github.com/toniov/p-iteration.git"},"versions":{"1.1.8":{"name":"p-iteration","version":"1.1.8","description":"Make array iteration easy when using async/await and Promises","main":"index.js","types":"index.d.ts","scripts":{"test":"ava test/index.js","lint":"eslint lib test","generate-docs":"jsdoc -c .jsdoc.json -R README.md lib/static-methods.js"},"keywords":["async/await","async","await","asynchronous","awaitable","async function","array","iteration","forEach","map","every","some","filter","reduce"],"author":{"name":"Antonio Valverde"},"license":"MIT","devDependencies":{"ava":"1.3.1","babel-eslint":"7.2.3","eslint":"4.0.0","jsdoc":"3.4.3","jsdoc-strip-async-await":"0.1.0","simple-jsdoc":"0.0.4"},"engines":{"node":">=8.0.0"},"browserify":{"transform":[["babelify",{"presets":["es2015","es2016","es2017"]}]]},"repository":{"type":"git","url":"git+https://github.com/toniov/p-iteration.git"},"gitHead":"97436e0a14865530a3a54530a289801de107ae21","bugs":{"url":"https://github.com/toniov/p-iteration/issues"},"homepage":"https://github.com/toniov/p-iteration#readme","_id":"p-iteration@1.1.8","_nodeVersion":"11.11.0","_npmVersion":"6.7.0","dist":{"shasum":"14df726d55af368beba81bcc92a26bb1b48e714a","size":5344,"noattachment":false,"key":"/p-iteration/-/p-iteration-1.1.8.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-iteration/download/p-iteration-1.1.8.tgz"},"maintainers":[{"name":"antonvs","email":"avs.toka@gmail.com"}],"_npmUser":{"name":"antonvs","email":"avs.toka@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-iteration_1.1.8_1552635584693_0.4790657364625299"},"_hasShrinkwrap":false,"publish_time":1552635585157,"_cnpm_publish_time":1552635585157},"1.1.7":{"name":"p-iteration","version":"1.1.7","description":"Make array iteration easy when using async/await and Promises","main":"index.js","types":"index.d.ts","scripts":{"test":"ava test/index.js","lint":"eslint lib test","generate-docs":"jsdoc -c .jsdoc.json -R README.md lib/static-methods.js"},"keywords":["async/await","async","await","asynchronous","awaitable","async function","array","iteration","forEach","map","every","some","filter","reduce"],"author":{"name":"Antonio Valverde"},"license":"ISC","devDependencies":{"ava":"^0.19.1","babel-eslint":"^7.2.3","eslint":"^4.0.0","jsdoc":"^3.4.3","jsdoc-strip-async-await":"^0.1.0","simple-jsdoc":"0.0.4"},"engines":{"node":">=8.0.0"},"browserify":{"transform":[["babelify",{"presets":["es2015","es2016","es2017"]}]]},"repository":{"type":"git","url":"git+https://github.com/toniov/p-iteration.git"},"gitHead":"2a37e96ab22a21856c2ddea9cd3f1b5c3dcd4138","bugs":{"url":"https://github.com/toniov/p-iteration/issues"},"homepage":"https://github.com/toniov/p-iteration#readme","_id":"p-iteration@1.1.7","_npmVersion":"5.3.0","_nodeVersion":"8.2.1","_npmUser":{"name":"antonvs","email":"avs.toka@gmail.com"},"dist":{"shasum":"9e71d79ede244b9f52592521f4487a56b6fb50fa","size":6777,"noattachment":false,"key":"/p-iteration/-/p-iteration-1.1.7.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-iteration/download/p-iteration-1.1.7.tgz"},"maintainers":[{"name":"antonvs","email":"avs.toka@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-iteration_1.1.7_1526742054647_0.9343846209306494"},"_hasShrinkwrap":false,"publish_time":1526742054747,"_cnpm_publish_time":1526742054747},"1.1.5":{"name":"p-iteration","version":"1.1.5","description":"Make array iteration easy when using async/await and Promises","main":"index.js","scripts":{"test":"ava test/index.js","lint":"eslint lib test","generate-docs":"jsdoc -c .jsdoc.json -R README.md lib/static-methods.js"},"keywords":["async/await","async","await","asynchronous","awaitable","async function","array","iteration","forEach","map","every","some","filter","reduce"],"author":{"name":"Antonio Valverde"},"license":"ISC","devDependencies":{"ava":"^0.19.1","babel-eslint":"^7.2.3","eslint":"^4.0.0","jsdoc":"^3.4.3","jsdoc-strip-async-await":"^0.1.0","simple-jsdoc":"0.0.4"},"engines":{"node":">=8.0.0"},"repository":{"type":"git","url":"git+https://github.com/toniov/p-iteration.git"},"gitHead":"d7bee4246b48ef00a2a7e187c1d1c58aea07ed67","bugs":{"url":"https://github.com/toniov/p-iteration/issues"},"homepage":"https://github.com/toniov/p-iteration#readme","_id":"p-iteration@1.1.5","_npmVersion":"5.3.0","_nodeVersion":"8.1.2","_npmUser":{"name":"antonvs","email":"avs.toka@gmail.com"},"dist":{"shasum":"c8dd8e61d5bc1a151c7c7ccc2e288c0fb826eb8b","size":6029,"noattachment":false,"key":"/p-iteration/-/p-iteration-1.1.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-iteration/download/p-iteration-1.1.5.tgz"},"maintainers":[{"name":"antonvs","email":"avs.toka@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-iteration-1.1.5.tgz_1501123828896_0.14763470622710884"},"directories":{},"publish_time":1501123828996,"_hasShrinkwrap":false,"_cnpm_publish_time":1501123828996},"1.1.4":{"name":"p-iteration","version":"1.1.4","description":"Make array iteration easy when using async/await and Promises","main":"index.js","scripts":{"test":"ava test/index.js","lint":"eslint lib test","generate-docs":"jsdoc -c .jsdoc.json -R README.md lib/static-methods.js"},"keywords":["async/await","async","await","asynchronous","awaitable","async function","array","iteration","forEach","map","every","some","filter","reduce"],"author":{"name":"Antonio Valverde"},"license":"ISC","devDependencies":{"ava":"^0.19.1","babel-eslint":"^7.2.3","eslint":"^4.0.0","jsdoc":"^3.4.3","jsdoc-strip-async-await":"^0.1.0","simple-jsdoc":"0.0.4"},"engines":{"node":">=8.0.0"},"repository":{"type":"git","url":"git+https://github.com/toniov/p-iteration.git"},"gitHead":"18ebe7e6e906884fc5519638e6730e88a06a35b4","bugs":{"url":"https://github.com/toniov/p-iteration/issues"},"homepage":"https://github.com/toniov/p-iteration#readme","_id":"p-iteration@1.1.4","_npmVersion":"5.0.3","_nodeVersion":"8.1.3","_npmUser":{"name":"antonvs","email":"avs.toka@gmail.com"},"dist":{"shasum":"76f3a94fed7275e6bf0fb041da859d8fb5184fea","size":4781,"noattachment":false,"key":"/p-iteration/-/p-iteration-1.1.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-iteration/download/p-iteration-1.1.4.tgz"},"maintainers":[{"name":"antonvs","email":"avs.toka@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-iteration-1.1.4.tgz_1500389135013_0.719369487836957"},"directories":{},"publish_time":1500389135145,"_hasShrinkwrap":false,"_cnpm_publish_time":1500389135145},"1.1.3":{"name":"p-iteration","version":"1.1.3","description":"Make array iteration easy when using async/await and Promises","main":"index.js","scripts":{"test":"ava test/index.js","lint":"eslint lib test","generate-docs":"jsdoc -c .jsdoc.json -R README.md lib/static-methods.js"},"keywords":["async/await","async","await","asynchronous","awaitable","async function","array","iteration","forEach","map","every","some","filter","reduce"],"author":{"name":"Antonio Valverde"},"license":"ISC","devDependencies":{"ava":"^0.19.1","babel-eslint":"^7.2.3","eslint":"^4.0.0","jsdoc":"^3.4.3","jsdoc-strip-async-await":"^0.1.0","simple-jsdoc":"0.0.4"},"engines":{"node":">=8.0.0"},"repository":{"type":"git","url":"git+https://github.com/toniov/p-iteration.git"},"gitHead":"581c68f07c8985e375598bb27d72295449cbd004","bugs":{"url":"https://github.com/toniov/p-iteration/issues"},"homepage":"https://github.com/toniov/p-iteration#readme","_id":"p-iteration@1.1.3","_npmVersion":"5.3.0","_nodeVersion":"8.1.2","_npmUser":{"name":"antonvs","email":"avs.toka@gmail.com"},"dist":{"shasum":"694be4404377e17a383c9d7f8b976fccb54b3a1f","size":5860,"noattachment":false,"key":"/p-iteration/-/p-iteration-1.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-iteration/download/p-iteration-1.1.3.tgz"},"maintainers":[{"name":"antonvs","email":"avs.toka@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-iteration-1.1.3.tgz_1500341857386_0.5518236281350255"},"directories":{},"publish_time":1500341857567,"_cnpm_publish_time":1500341857567,"_hasShrinkwrap":false},"1.1.2":{"name":"p-iteration","version":"1.1.2","description":"Make array iteration easy when using async/await and Promises","main":"index.js","scripts":{"test":"ava test/index.js","lint":"eslint lib test","generate-docs":"jsdoc -c .jsdoc.json -R README.md lib/static-methods.js"},"keywords":["async/await","async","await","asynchronous","awaitable","async function","array","iteration","forEach","map","every","some","filter","reduce"],"author":{"name":"Antonio Valverde"},"license":"ISC","devDependencies":{"ava":"^0.19.1","babel-eslint":"^7.2.3","eslint":"^4.0.0","jsdoc":"^3.4.3","jsdoc-strip-async-await":"^0.1.0","simple-jsdoc":"0.0.4"},"engines":{"node":">=8.0.0"},"repository":{"type":"git","url":"git+https://github.com/toniov/p-iteration.git"},"gitHead":"3dc837ba99c6dd9648f61cd20a60b22d5ac02153","bugs":{"url":"https://github.com/toniov/p-iteration/issues"},"homepage":"https://github.com/toniov/p-iteration#readme","_id":"p-iteration@1.1.2","_npmVersion":"5.0.3","_nodeVersion":"8.1.2","_npmUser":{"name":"antonvs","email":"avs.toka@gmail.com"},"dist":{"shasum":"7d94df7d8a70951357ca5b4429c2f8e3702fce13","size":5773,"noattachment":false,"key":"/p-iteration/-/p-iteration-1.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-iteration/download/p-iteration-1.1.2.tgz"},"maintainers":[{"name":"antonvs","email":"avs.toka@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-iteration-1.1.2.tgz_1500212616396_0.04938152921386063"},"directories":{},"publish_time":1500212616536,"_hasShrinkwrap":false,"_cnpm_publish_time":1500212616536},"1.1.1":{"name":"p-iteration","version":"1.1.1","description":"Make array iteration easy when using async/await and Promises","main":"index.js","scripts":{"test":"ava test/index.js","lint":"eslint lib test","generate-docs":"jsdoc -c .jsdoc.json -R README.md lib/static-methods.js"},"keywords":["async/await","async","await","asynchronous","awaitable","async function","array","iteration","forEach","map","every","some","filter","reduce"],"author":{"name":"Antonio Valverde"},"license":"ISC","devDependencies":{"ava":"^0.19.1","babel-eslint":"^7.2.3","eslint":"^4.0.0","jsdoc":"^3.4.3","jsdoc-strip-async-await":"^0.1.0","simple-jsdoc":"0.0.4"},"engines":{"node":">=8.0.0"},"repository":{"type":"git","url":"git+https://github.com/toniov/p-iteration.git"},"gitHead":"22f1ad75c7d41570c976740cb476f69f16a94626","bugs":{"url":"https://github.com/toniov/p-iteration/issues"},"homepage":"https://github.com/toniov/p-iteration#readme","_id":"p-iteration@1.1.1","_npmVersion":"5.0.3","_nodeVersion":"8.1.2","_npmUser":{"name":"antonvs","email":"avs.toka@gmail.com"},"dist":{"shasum":"9ff5b50858c821f264824b25085536c5d803c6f7","size":5690,"noattachment":false,"key":"/p-iteration/-/p-iteration-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-iteration/download/p-iteration-1.1.1.tgz"},"maintainers":[{"name":"antonvs","email":"avs.toka@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-iteration-1.1.1.tgz_1498553717226_0.11031118431128561"},"directories":{},"publish_time":1498553717398,"_hasShrinkwrap":false,"_cnpm_publish_time":1498553717398},"1.1.0":{"name":"p-iteration","version":"1.1.0","description":"Make array iteration easy when using async/await and Promises","main":"index.js","scripts":{"test":"ava test/index.js","lint":"eslint lib test","generate-docs":"jsdoc -c .jsdoc.json -R README.md lib/static-methods.js"},"keywords":["async/await","async","await","asynchronous","awaitable","async function","array","iteration","forEach","map","every","some","filter","reduce"],"author":{"name":"Antonio Valverde"},"license":"ISC","devDependencies":{"ava":"^0.19.1","babel-eslint":"^7.2.3","eslint":"^4.0.0","jsdoc":"^3.4.3","jsdoc-strip-async-await":"^0.1.0","simple-jsdoc":"0.0.4"},"engines":{"node":">=8.0.0"},"repository":{"type":"git","url":"git+https://github.com/toniov/p-iteration.git"},"gitHead":"76cd31c457cf756e26237389c61034699c2b4454","bugs":{"url":"https://github.com/toniov/p-iteration/issues"},"homepage":"https://github.com/toniov/p-iteration#readme","_id":"p-iteration@1.1.0","_npmVersion":"5.0.3","_nodeVersion":"8.1.2","_npmUser":{"name":"antonvs","email":"avs.toka@gmail.com"},"dist":{"shasum":"a843f6b2a1b3eae1f8090849c81b87d4135f32bf","size":5683,"noattachment":false,"key":"/p-iteration/-/p-iteration-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-iteration/download/p-iteration-1.1.0.tgz"},"maintainers":[{"name":"antonvs","email":"avs.toka@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-iteration-1.1.0.tgz_1498553136445_0.6520563559606671"},"directories":{},"publish_time":1498553136537,"_cnpm_publish_time":1498553136537,"_hasShrinkwrap":false},"1.0.1":{"name":"p-iteration","version":"1.0.1","description":"Make array iteration easy with async/await and promises","main":"index.js","scripts":{"test":"ava test/index.js","lint":"eslint lib test"},"keywords":["async/await","async","await","asynchronous","awaitable","async function","array","iteration","forEach","map","every","some","filter","reduce"],"author":{"name":"Antonio Valverde"},"license":"ISC","devDependencies":{"ava":"^0.19.1","babel-eslint":"^7.2.3","eslint":"^4.0.0"},"engines":{"node":">=8.0.0"},"repository":{"type":"git","url":"git+https://github.com/toniov/p-iteration.git"},"gitHead":"8df0cc7e68e5dddec2b042702ab219c7a49ca729","bugs":{"url":"https://github.com/toniov/p-iteration/issues"},"homepage":"https://github.com/toniov/p-iteration#readme","_id":"p-iteration@1.0.1","_npmVersion":"5.0.3","_nodeVersion":"8.1.2","_npmUser":{"name":"antonvs","email":"avs.toka@gmail.com"},"dist":{"shasum":"332dfc1b44d81a658ec25eed6ffe349a433b0959","size":4169,"noattachment":false,"key":"/p-iteration/-/p-iteration-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-iteration/download/p-iteration-1.0.1.tgz"},"maintainers":[{"name":"antonvs","email":"avs.toka@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-iteration-1.0.1.tgz_1498479352057_0.08487544255331159"},"directories":{},"publish_time":1498479352266,"_hasShrinkwrap":false,"_cnpm_publish_time":1498479352266},"1.0.0":{"name":"p-iteration","version":"1.0.0","description":"Make array iteration easy with async/await and promises","main":"index.js","scripts":{"test":"ava test/index.js","lint":"eslint lib test"},"keywords":["async/await","async","await","asynchronous","awaitable","async function","array","iteration","forEach","map","every","some","filter","reduce"],"author":{"name":"Antonio Valverde"},"license":"ISC","devDependencies":{"ava":"^0.19.1","babel-eslint":"^7.2.3","eslint":"^4.0.0"},"engines":{"node":">=8.0.0"},"repository":{"type":"git","url":"git+https://github.com/toniov/p-iteration.git"},"gitHead":"a3301742b1a5bc4f75333cec3676d25d91f9daca","bugs":{"url":"https://github.com/toniov/p-iteration/issues"},"homepage":"https://github.com/toniov/p-iteration#readme","_id":"p-iteration@1.0.0","_npmVersion":"5.0.3","_nodeVersion":"8.1.0","_npmUser":{"name":"antonvs","email":"avs.toka@gmail.com"},"dist":{"shasum":"59f9c34e92781d22a095ccb4e26929b5bf116b57","size":2886,"noattachment":false,"key":"/p-iteration/-/p-iteration-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-iteration/download/p-iteration-1.0.0.tgz"},"maintainers":[{"name":"antonvs","email":"avs.toka@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-iteration-1.0.0.tgz_1497892526496_0.11982366302981973"},"directories":{},"publish_time":1497892526626,"_hasShrinkwrap":false,"_cnpm_publish_time":1497892526626}},"readme":"# p-iteration [![Build Status](https://travis-ci.org/toniov/p-iteration.svg?branch=master)](https://travis-ci.org/toniov/p-iteration) [![NPM version](https://badge.fury.io/js/p-iteration.svg)](http://badge.fury.io/js/p-iteration)\n\n\n> Make array iteration easy when using async/await and promises\n\n- Same functionality as the ES5 Array iteration methods we all know\n- All the methods return a `Promise`, making them awaitable and thenable\n- Allow the usage of async functions as callback\n- Callbacks run concurrently\n- Lightweight (no prd dependencies)\n\n\n## Install\n\n```\n$ npm install --save p-iteration\n```\n\n\n## Usage\n\nSmooth asynchronous iteration using `async/await`:\n\n```js\nconst { map } = require('p-iteration');\n\n// map passing an async function as callback\nfunction getUsers (userIds) {\n  return map(userIds, async userId => {\n    const response = await fetch(`/api/users/${userId}`);\n    return response.json();\n  });\n}\n\n// map passing a non-async function as callback\nasync function getRawResponses (userIds) {\n  const responses = await map(userIds, userId => fetch(`/api/users/${userId}`));\n  // ... do some stuff\n  return responses;\n}\n\n// ...\n```\n\n```js\nconst { filter } = require('p-iteration');\n\nasync function getFilteredUsers (userIds, name) {\n  const filteredUsers = await filter(userIds, async userId => {\n    const response = await fetch(`/api/users/${userId}`);\n    const user = await response.json();\n    return user.name === name;\n  });\n  // ... do some stuff\n  return filteredUsers;\n}\n\n// ...\n```\n\nAll methods return a Promise so they can just be used outside an async function just with plain Promises:\n\n```js\nconst { map } = require('p-iteration');\n\nmap([123, 125, 156], (userId) => fetch(`/api/users/${userId}`))\n  .then((result) => {\n    // ...\n  })\n  .catch((error) => {\n    // ...\n  });\n```\n\nIf there is a Promise in the array, it will be unwrapped before calling the callback:\n\n```js\nconst { forEach } = require('p-iteration');\nconst fetchJSON = require('nonexistent-module');\n\nfunction logUsers () {\n  const users = [\n    fetchJSON('/api/users/125'), // returns a Promise\n    { userId: 123, name: 'Jolyne', age: 19 },\n    { userId: 156, name: 'Caesar', age: 20 }\n  ];\n  return forEach(users, (user) => {\n    console.log(user);\n  });\n}\n```\n\n```js\nconst { find } = require('p-iteration');\nconst fetchJSON = require('nonexistent-module');\n\nfunction findUser (name) {\n  const users = [\n    fetchJSON('/api/users/125'), // returns a Promise\n    { userId: 123, name: 'Jolyne', age: 19 },\n    { userId: 156, name: 'Caesar', age: 20 }\n  ];\n  return find(users, (user) => user.name === name);\n}\n```\n\nThe callback will be invoked as soon as the Promise is unwrapped:\n\n```js\nconst { forEach } = require('p-iteration');\n\n// function that returns a Promise resolved after 'ms' passed\nconst delay = (ms) => new Promise(resolve => setTimeout(() => resolve(ms), ms));\n\n// 100, 200, 300 and 500 will be logged in this order\nasync function logNumbers () {\n  const numbers = [\n    delay(500),\n    delay(200),\n    delay(300),\n    100\n  ];\n  await forEach(numbers, (number) => {\n    console.log(number);\n  });\n}\n```\n\n## API\n\nThe methods are implementations of the ES5 Array iteration methods we all know with the same syntax, but all return a `Promise`. Also, with the exception of `reduce()`, all methods callbacks are run concurrently. There is a series version of each method, called: `${methodName}Series`, series methods use the same API that their respective concurrent ones.\n\nThere is a link to the [original reference](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) of each method in the docs of this module:\n\n- [`forEach`(array, callback, [thisArg])](https://toniov.github.io/p-iteration/global.html#forEach)\n\n- [`forEachSeries`(array, callback, [thisArg])](https://toniov.github.io/p-iteration/global.html#forEachSeries)\n\n- [`map`(array, callback, [thisArg])](https://toniov.github.io/p-iteration/global.html#map)\n\n- [`mapSeries`(array, callback, [thisArg])](https://toniov.github.io/p-iteration/global.html#mapSeries)\n\n- [`find`(array, callback, [thisArg])](https://toniov.github.io/p-iteration/global.html#find)\n\n- [`findSeries`(array, callback, [thisArg])](https://toniov.github.io/p-iteration/global.html#findSeries)\n\n- [`findIndex`(array, callback, [thisArg])](https://toniov.github.io/p-iteration/global.html#findIndex)\n\n- [`findIndexSeries`(array, callback, [thisArg])](https://toniov.github.io/p-iteration/global.html#findIndexSeries)\n\n- [`some`(array, callback, [thisArg])](https://toniov.github.io/p-iteration/global.html#some)\n\n- [`someSeries`(array, callback, [thisArg])](https://toniov.github.io/p-iteration/global.html#someSeries)\n\n- [`every`(array, callback, [thisArg])](https://toniov.github.io/p-iteration/global.html#every)\n\n- [`everySeries`(array, callback, [thisArg])](https://toniov.github.io/p-iteration/global.html#everySeries)\n\n- [`filter`(array, callback, [thisArg])](https://toniov.github.io/p-iteration/global.html#filter)\n\n- [`filterSeries`(array, callback, [thisArg])](https://toniov.github.io/p-iteration/global.html#filterSeries)\n\n- [`reduce`(array, callback, [initialValue])](https://toniov.github.io/p-iteration/global.html#reduce)\n\n\n## Instance methods\n\nExtending native objects is discouraged and I don't recommend it, but in case you know what you are doing, you can extend `Array.prototype` to use the above methods as instance methods. They have been renamed as `async${MethodName}`, so the original ones are not overwritten.\n\n```js\nconst { instanceMethods } = require('p-iteration');\n\nObject.assign(Array.prototype, instanceMethods);\n\nasync function example () {\n  const foo = await [1, 2, 3].asyncMap((id) => fetch(`/api/example/${id}`));\n}\n```\n\n\n## License\n\nMIT © [Antonio V](https://github.com/toniov)","_attachments":{},"homepage":"https://github.com/toniov/p-iteration#readme","bugs":{"url":"https://github.com/toniov/p-iteration/issues"},"license":"MIT"}