Skip to content

Instantly share code, notes, and snippets.

Created Mar 20, 2015
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