Skip to content

Instantly share code, notes, and snippets.

@dagda1
Created March 4, 2014 05:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dagda1/9340695 to your computer and use it in GitHub Desktop.
Save dagda1/9340695 to your computer and use it in GitHub Desktop.
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