Skip to content

Instantly share code, notes, and snippets.

@nightspirit
Created Mar 20, 2015
Embed
What would you like to do?
Javascript Defer snippet
function Defer () {
var result = {};
result.promise = new Promise(function(resolve, reject) {
result.resolve = resolve;
result.reject = reject;
});
return result;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment