Created
March 4, 2014 05:21
-
-
Save dagda1/9340695 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BulkLoader.prototype.load = function() { | |
var self = this; | |
return async(function * () { | |
try { | |
self.users = yield getJSON('/users'); | |
self.contacts = yield getJSON('/contacts'); | |
self.companies = yield getJSON('/companies'); | |
return self; | |
} catch (err) { | |
throw err; | |
} | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment