diff --git a/.github/funding.yml b/.github/funding.yml new file mode 100644 index 0000000..7ede066 --- /dev/null +++ b/.github/funding.yml @@ -0,0 +1,2 @@ +github: sindresorhus +custom: https://sindresorhus.com/donate diff --git a/.travis.yml b/.travis.yml index f3fa8cd..9d7745e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ language: node_js node_js: + - '14' + - '12' - '10' - - '8' diff --git a/license b/license index e7af2f7..fa7ceba 100644 --- a/license +++ b/license @@ -1,6 +1,6 @@ MIT License -Copyright (c) Sindre Sorhus (sindresorhus.com) +Copyright (c) Sindre Sorhus (https://sindresorhus.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/package.json b/package.json index 75d90d8..3c2fe24 100644 --- a/package.json +++ b/package.json @@ -4,13 +4,14 @@ "description": "Run promise-returning & async functions a specific number of times concurrently", "license": "MIT", "repository": "sindresorhus/p-times", + "funding": "https://github.com/sponsors/sindresorhus", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" + "url": "https://sindresorhus.com" }, "engines": { - "node": ">=8" + "node": ">=10" }, "scripts": { "test": "xo && ava && tsd" diff --git a/readme.md b/readme.md index 40d7b18..2c880b1 100644 --- a/readme.md +++ b/readme.md @@ -1,15 +1,13 @@ -# p-times [![Build Status](https://travis-ci.org/sindresorhus/p-times.svg?branch=master)](https://travis-ci.org/sindresorhus/p-times) +# p-times [![Build Status](https://travis-ci.com/sindresorhus/p-times.svg?branch=master)](https://travis-ci.com/sindresorhus/p-times) > Run promise-returning & async functions a specific number of times concurrently - ## Install ``` $ npm install p-times ``` - ## Usage ```js @@ -23,10 +21,9 @@ const pTimes = require('p-times'); })(); ``` - ## API -### pTimes(count, mapper, [options]) +### pTimes(count, mapper, options?) Returns a `Promise` that is fulfilled when all promises returned from `mapper` are fulfilled, or rejects if any of the promises reject. The fulfilled value is an `Array` of the fulfilled values returned from `mapper` in order. @@ -44,12 +41,12 @@ Expected to return a `Promise` or value. #### options -Type: `Object` +Type: `object` ##### concurrency -Type: `number`
-Default: `Infinity`
+Type: `number`\ +Default: `Infinity`\ Minimum: `1` Number of concurrently pending promises returned by `mapper`. @@ -67,8 +64,3 @@ When set to `false`, instead of stopping when a promise rejects, it will wait fo - [p-map](https://github.com/sindresorhus/p-map) - Map over promises concurrently - [p-filter](https://github.com/sindresorhus/p-filter) - Filter promises concurrently - [More…](https://github.com/sindresorhus/promise-fun) - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com)