maintained by PandaClouds.com
PCPromise
provides utility functions for javascript promises and async/await.
-
If you want to use this library, you first need to install the Node.js.
-
When you install node.js, will also be installed npm.
-
Please run the following command.
npm install --save @panda-clouds/promise
const PCPromise = require('@panda-clouds/promise');
// example usage
async () => {
await PCPromise.wait(5000) // pauses for 5 seconds without blocking the main thread
}
You can replace PCPromise with any variable.
Unit Tests are an additional resource for learning functionality.
Pauses execution of that thread without blocking
Example:
async () => {
await PCPromise.wait(5000) // pauses for 5 seconds without blocking the main thread
}
Pull requests are welcome! here is a checklist to speed things up:
- modify
PCPromise.js
- add unit tests in
PCPromise.spec.js
- run
npm test
- document method in
README.md
- add your name to 'Contributors' in
README.md
(Add your name)
- [*] Marc Smith