IdeaHaven / influence.old

Explore the influence placed on our federal representatives.
6 stars 3 forks source link

fixed duplicate code block #47

Open EpiphanyMachine opened 11 years ago

EpiphanyMachine commented 11 years ago

this is frequently repeated; consider something like this: Api_easyget = (url, cb, that) => errcb = (err, data) -> if(err) #... else cb(data) Api_get url, errcb, that

https://github.com/EpiphanyMachine/influence/blob/master/src/coffee/angular/controllers-b-overview.coffee#L33

EpiphanyMachine commented 11 years ago

another approach to this:

Api_get(url, errwrap(cb), this)