Skip to content

Instantly share code, notes, and snippets.

@notajingoist
notajingoist / recursivepromises.js
Last active December 20, 2015 21:18
Recursion + Promises by the brilliant @nhunzaker
function harvest(id, parent) {
var promise = $.Deferred();
var post;
request({
url: "...",
json: true,
timeout: 30000
}, function(error, response, body) {