Skip to content

bullgit/promise-promise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Dec 29, 2016
3f32a90 Â· Dec 29, 2016

History

22 Commits
Dec 7, 2016
Dec 7, 2016
Dec 29, 2016
Dec 6, 2016
Dec 6, 2016
Dec 6, 2016
Dec 7, 2016
Dec 7, 2016
Dec 8, 2016
Dec 6, 2016
Dec 29, 2016
Dec 29, 2016
Dec 29, 2016
Dec 29, 2016

Repository files navigation

such bull much git

npm version Build Status Coverage Status devDependency Status Unicorn

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