Skip to content

Commit

Permalink
Updated README.md;
Browse files Browse the repository at this point in the history
  • Loading branch information
DigitalBrainJS committed Sep 9, 2020
1 parent c8228b8 commit 2f948dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jsdoc2md/README.hbs.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ A font-end example of wrapping fetch to the CPromise and handling cancellation u
fetch(url, {signal}).then(resolve, reject);
})
}
// url with 5s delay for response
// URL with 5 seconds delay to respond
const chain= cancelableFetch('https://run.mocky.io/v3/753aa609-65ae-4109-8f83-9cfe365290f0?mocky-delay=5s')
.then(console.log, console.warn);

setTimeout(()=> chain.cancel(), 1000);
````

Handling cancellation with `onCancel` listeners (see the live demo in the git repo):
Handling cancellation with `onCancel` listeners (see the [live demo](https://runkit.com/digitalbrainjs/runkit-npm-c-promise2)):
````javascript
import CPromise from "c-promise";

Expand Down

0 comments on commit 2f948dd

Please sign in to comment.