synchronized-promise
Turn ES6 Promise into synchronize function call, a simple wrapper of deasync package
Installation
npm install synchronized-promise --save
Usage
First, you need to require the synchronized-promise
packgage, for JavaScript:
const sp =
For TypeScript or ES6 later JavaScript:
Then call it as the following example:
// An promise base async functionlet { return { }} // regular usage // make it synchronizedlet syncFunc = const value = // value === 5
See test.js
for usage in details.
Contributors ✨
Thanks goes to these wonderful people (emoji key):
侠小然 💻 |
Clar Charron 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!