1.0.6 β’ Published 7 years ago
promise-promise v1.0.6
promise-promise
A funny Promise wrapper for those who can't keep promises. There's a 50:50 chance that the promise will be fulfilled. If not, it rejects with a random developer excuse. ππ Good luck π
Install
$ npm install promise-promise --save
Usage
import Promise from 'promise-promise';
const myAsyncOperation = new Promise(resolve => {
resolve('I should resolve π±');
});
myAsyncOperation
.then(response => {
console.log(response); // Sometimes it resolves
})
.catch(error => {
console.log(err); // Sometimes not π
});
License
MIT Β© RenΓ© Viering