{"_id":"p-every","_rev":"6-11760c44ce97bce15ed56b603edd841e","name":"p-every","description":"Test whether all promises passes a testing function","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.0":{"name":"p-every","version":"1.0.0","description":"Test whether all promises passes a testing function","license":"MIT","repository":{"type":"git","url":"git+https://github.com/kevva/p-every.git"},"author":{"name":"Kevin Martensson","email":"kevinmartensson@gmail.com","url":"github.com/kevva"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["async","await","bluebird","collection","concurrency","concurrently","every","filter","fulfilled","iterable","iterator","parallel","promise","promises"],"dependencies":{"p-filter":"^1.0.0"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"16b3619513bf18a7e329b9d31d07d3fcb39df209","bugs":{"url":"https://github.com/kevva/p-every/issues"},"homepage":"https://github.com/kevva/p-every#readme","_id":"p-every@1.0.0","_shasum":"2eeb6e8701d25b01801dcb4144e30dd1add873d7","_from":".","_npmVersion":"4.6.1","_nodeVersion":"7.8.0","_npmUser":{"name":"kevva","email":"kevinmartensson@gmail.com"},"dist":{"shasum":"2eeb6e8701d25b01801dcb4144e30dd1add873d7","tarball":"https://registry.npmjs.org/p-every/-/p-every-1.0.0.tgz","integrity":"sha512-PR805fzVaPQ8bRWvzWvjbDYCbIPA0C2vg3+wAdJpkrNsnU7X9lDzZqZIQzW928/Iu/uVsrqY3i577pYaXz6Cvg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDU2DFLNCcQfEGSPVvvEKphWjefNRfHFNqoeU6it+ykPwIhAK9WpLRmJEQILsMZUtunk3LqmBaog5Bpwgbk6Ntn9TDD"}]},"maintainers":[{"name":"kevva","email":"kevinmartensson@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-every-1.0.0.tgz_1495588793844_0.95263373083435"},"directories":{}},"1.0.1":{"name":"p-every","version":"1.0.1","description":"Test whether all promises passes a testing function","license":"MIT","repository":{"type":"git","url":"git+https://github.com/kevva/p-every.git"},"author":{"name":"Kevin Martensson","email":"kevinmartensson@gmail.com","url":"github.com/kevva"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["async","await","bluebird","collection","concurrency","concurrently","every","filter","fulfilled","iterable","iterator","parallel","promise","promises"],"dependencies":{"p-filter":"^1.0.0"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"e1ecea89595f8a4e96efce8b8033ae8557ec5d2e","bugs":{"url":"https://github.com/kevva/p-every/issues"},"homepage":"https://github.com/kevva/p-every#readme","_id":"p-every@1.0.1","_shasum":"2682d6d45026a8ab6c39229b9b300ffc2b1cf42e","_from":".","_npmVersion":"4.6.1","_nodeVersion":"7.8.0","_npmUser":{"name":"kevva","email":"kevinmartensson@gmail.com"},"dist":{"shasum":"2682d6d45026a8ab6c39229b9b300ffc2b1cf42e","tarball":"https://registry.npmjs.org/p-every/-/p-every-1.0.1.tgz","integrity":"sha512-dy6W3HDAITucl7hXB1qQWowGI2H8peS30tx1grNSq5RuU0lbnvYxFvb7B0Tb1bCqG1JnHEKREcPCh9nTeCIBGw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICPyxLEZL/cYLa+PT1p+oK34kQ8MwzF8YX7ywSykbN8HAiBqFFNcsnmqPPOfrW6IIMsjyzXEauHvWkShq3x5e61Jqw=="}]},"maintainers":[{"name":"kevva","email":"kevinmartensson@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-every-1.0.1.tgz_1495589134874_0.580252633895725"},"directories":{}},"1.0.2":{"name":"p-every","version":"1.0.2","description":"Test whether all promises passes a testing function","license":"MIT","repository":{"type":"git","url":"git+https://github.com/kevva/p-every.git"},"author":{"name":"Kevin Martensson","email":"kevinmartensson@gmail.com","url":"github.com/kevva"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["async","await","bluebird","collection","concurrency","concurrently","every","filter","fulfilled","iterable","iterator","parallel","promise","promises"],"dependencies":{"p-map":"^1.1.1"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"4492cea34071931000ca114e4e77ca119f83671c","bugs":{"url":"https://github.com/kevva/p-every/issues"},"homepage":"https://github.com/kevva/p-every#readme","_id":"p-every@1.0.2","_shasum":"4e01d85c23da19ed71a4afba319bdb4d94c85e00","_from":".","_npmVersion":"4.6.1","_nodeVersion":"7.8.0","_npmUser":{"name":"kevva","email":"kevinmartensson@gmail.com"},"dist":{"shasum":"4e01d85c23da19ed71a4afba319bdb4d94c85e00","tarball":"https://registry.npmjs.org/p-every/-/p-every-1.0.2.tgz","integrity":"sha512-gjwty1cfDiN3DjjEq9JX8go3pgG1CrqjSKW1YV1sFEZbv0wXqPCtP7rJRUvM3reZPP5lY3O0OzjC0H844hfvow==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDrA/Nl29oF/BMpHzkpEsfb0u+cRPpSwKjDCxXJaao/qQIhAKL5m9U58Y0QOqFY3AfimiKZ6i9fKUdoi91QlOs1ORQD"}]},"maintainers":[{"name":"kevva","email":"kevinmartensson@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-every-1.0.2.tgz_1495673195698_0.8527945869136602"},"directories":{}},"2.0.0":{"name":"p-every","version":"2.0.0","description":"Test whether all promises passes a testing function","license":"MIT","repository":{"type":"git","url":"git+https://github.com/kevva/p-every.git"},"author":{"name":"Kevin Martensson","email":"kevinmartensson@gmail.com","url":"github.com/kevva"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd-check"},"keywords":["async","await","bluebird","collection","concurrency","concurrently","every","filter","fulfilled","iterable","iterator","parallel","promise","promises"],"dependencies":{"p-map":"^2.0.0"},"devDependencies":{"ava":"^1.3.1","tsd-check":"^0.3.0","xo":"^0.24.0"},"gitHead":"025ab918257adf4702f530ac585ddc3373d68edd","bugs":{"url":"https://github.com/kevva/p-every/issues"},"homepage":"https://github.com/kevva/p-every#readme","_id":"p-every@2.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"kevva","email":"kevinmartensson@gmail.com"},"dist":{"integrity":"sha512-MCz9DqD5opPC48Zsd+BHm56O/HfhYIQQtupfDzhXoVgQdg/Ux4F8/JcdRuQ+arq7zD5fB6zP3axbH3d9Nr8dlw==","shasum":"ad940b82b1bd1da01c307b11e1dd25fe7286181a","tarball":"https://registry.npmjs.org/p-every/-/p-every-2.0.0.tgz","fileCount":5,"unpackedSize":5099,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJci27bCRA9TVsSAnZWagAAi6IP/j1xOKrtXOlUnt9Cusx5\n8Bx+rcOBykInsKYgI06WyYrjbZigBT07wMJGBfacGrfz5lGpVXGEg7kAmUkL\nvzBDZIcKhhM4OuQ3/clMRzy4VZYVT4lnf9icxrUqEL7iym9H9GMDApHuXyHn\nU7BrBEEhuFA32srmvfHYnUwG2ibWk3qR0lBjuzLoJzewXHFB2KmJ4+5qvVsM\n/yBk9VVaEMhL77VQhNXOaPvDsPPSND6/jIb9id9qy+j/i2yX+sEKH/iKJhaK\n0c8xaQiWfO2kO7TDbeFIKrbDxPIBwAT197nDx41sAT4N53xqXBolKKg0O1Sp\nnKPUJcfuYLFnK+ccoBDoOAcS4qYnZvxmB/F2NU2sVVXOine2VVKMAVz1K424\nUlMI09mHJ6At4BmCuLI26UIU9cCbUy+OYe3uamixXlQfBjJ/quU3PtxNBxeY\niyKAouyd908pcg/frX5CuWseBZnb9fVww/DqXDcH/7wsugjklbzTkrvYTCN4\nb5JWWV87Gy1a3X6eBeoL/n1KGUXOdzSamw+YWV3jfmyLJhwb/7yBqRElQLX7\ngvRSKDnxhd0XkwxpFWA4JuLBNedHsLVFuh9ZCUMBNWr0tXtmzOsB9B8WCM8v\nNLeAiQo9labxzxcmydkKY3bbIYwWdEZTe4SoSBDWj4gt7tjj2RwPwltVpaHB\nZKNu\r\n=MwxE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEG1SKkQgH8bwxqaTiZNUkUSgsq6mG6Pe++svkkut95QAiA5N+2VSTMlgU5WwtaqOJoTcaSGmKtF5Yu4T5b7Ibe0yw=="}]},"maintainers":[{"name":"kevva","email":"kevinmartensson@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-every_2.0.0_1552641754654_0.3169331683907497"},"_hasShrinkwrap":false}},"readme":"# p-every [![Build Status](https://travis-ci.org/kevva/p-every.svg?branch=master)](https://travis-ci.org/kevva/p-every)\n\n> Test whether all promises passes a testing function\n\nLike [`Array.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every) for promises.\n\n## Install\n\n```\n$ npm install --save p-every\n```\n\n\n## Usage\n\n```js\nconst pEvery = require('p-every');\nconst getContinent = require('get-continent'); // not a real module\n\nconst places = [\n\tgetCapital('Norway').then(info => info.name),\n\t'Bangkok, Thailand',\n\t'Berlin, Germany',\n\t'Tokyo, Japan'\n];\n\nconst testFunction = async place => {\n\tconst continent = await getContinent(place);\n\treturn continent === 'europe';\n}\n\n(async () => {\n\tconst result = await pEvery(places, testFunction);\n\tconsole.log(result);\n\t//=> false\n})();\n```\n\n\n## API\n\n### pEvery(input, testFunction, [options])\n\nReturns a `Promise` that is fulfilled when all promises in `input` and ones returned from `testFunction` are fulfilled, or rejects if any of the promises reject. The fulfilled value is a `boolean` that is `true` if all Promises passed the test and `false` otherwise.\n\n#### input\n\nType: `Iterable<Promise|any>`\n\nIterated over concurrently in the `testFunction` function.\n\n#### testFunction(element, index)\n\nType: `Function`\n\nPredicate function, expected to return a `Promise<boolean>` or `boolean`.\n\n#### options\n\nType: `Object`\n\n##### concurrency\n\nType: `number`<br>\nDefault: `Infinity`<br>\nMinimum: `1`\n\nNumber of concurrently pending promises returned by `testFunction`.\n\n\n## Related\n\n* [p-filter](https://github.com/sindresorhus/p-filter) - Filter promises concurrently\n* [p-locate](https://github.com/sindresorhus/p-locate) - Get the first fulfilled promise that satisfies the provided testing function\n* [p-map](https://github.com/sindresorhus/p-map) - Map over promises concurrently\n* [More…](https://github.com/sindresorhus/promise-fun)\n\n\n## License\n\nMIT © [Kevin Martensson](http://github.com/kevva)\n","maintainers":[{"name":"kevva","email":"kevinmartensson@gmail.com"}],"time":{"modified":"2022-06-23T05:44:54.532Z","created":"2017-05-24T01:19:54.762Z","1.0.0":"2017-05-24T01:19:54.762Z","1.0.1":"2017-05-24T01:25:35.831Z","1.0.2":"2017-05-25T00:46:36.738Z","2.0.0":"2019-03-15T09:22:34.849Z"},"homepage":"https://github.com/kevva/p-every#readme","keywords":["async","await","bluebird","collection","concurrency","concurrently","every","filter","fulfilled","iterable","iterator","parallel","promise","promises"],"repository":{"type":"git","url":"git+https://github.com/kevva/p-every.git"},"author":{"name":"Kevin Martensson","email":"kevinmartensson@gmail.com","url":"github.com/kevva"},"bugs":{"url":"https://github.com/kevva/p-every/issues"},"license":"MIT","readmeFilename":"readme.md"}