Skip to content

Commit

Permalink
Meta tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Feb 21, 2020
1 parent 33535c8 commit 6c130a8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
5 changes: 3 additions & 2 deletions index.d.ts
Expand Up @@ -762,8 +762,9 @@ declare class PProgress<ValueType> extends Promise<ValueType> {
/**
@param progress - Call this with progress updates. It expects a number between 0 and 1.
Multiple calls with the same number will result in only one `onProgress()`
event. Calling with a number lower than previously will be ignored.
Multiple calls with the same number will result in only one `onProgress()` event.
Calling with a number lower than previously will be ignored.
Progress percentage `1` is reported for you when the promise resolves. If you set it yourself, it will simply be ignored.
*/
Expand Down
2 changes: 1 addition & 1 deletion license
@@ -1,6 +1,6 @@
MIT License

Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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:

Expand Down
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -4,10 +4,11 @@
"description": "Create a promise that reports progress",
"license": "MIT",
"repository": "sindresorhus/p-progress",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
"url": "https://sindresorhus.com"
},
"engines": {
"node": ">=8"
Expand Down
14 changes: 6 additions & 8 deletions readme.md
Expand Up @@ -4,14 +4,12 @@
Useful for reporting progress to the user during long-running async operations.


## Install

```
$ npm install p-progress
```


## Usage

```js
Expand Down Expand Up @@ -42,7 +40,6 @@ const progressPromise = new PProgress((resolve, reject, progress) => {
})();
```


## API

### instance = new PProgress(executor)
Expand All @@ -58,7 +55,9 @@ Type: `Function`
Call this with progress updates. It expects a number between 0 and 1.

Multiple calls with the same number will result in only one `onProgress()`
event. Calling with a number lower than previously will be ignored.
event.

Calling with a number lower than previously will be ignored.

Progress percentage `1` is reported for you when the promise resolves. If you set it yourself, it will simply be ignored.

Expand Down Expand Up @@ -147,7 +146,7 @@ const allProgressPromise = PProgress.all([

#### promises

Type: `Array`
Type: `Promise[]`

Array of promises or promise-returning functions, similar to [p-all](https://github.com/sindresorhus/p-all).

Expand All @@ -157,8 +156,8 @@ Type: `object`

##### concurrency

Type: `number`<br>
Default: `Infinity`<br>
Type: `number`\
Default: `Infinity`\
Minimum: `1`

Number of concurrently pending promises.
Expand All @@ -167,7 +166,6 @@ To run the promises in series, set it to `1`.

When this option is set, the first argument must be an array of promise-returning functions.


## Related

- [p-cancelable](https://github.com/sindresorhus/p-cancelable) - Create a promise that can be canceled
Expand Down

0 comments on commit 6c130a8

Please sign in to comment.