Open EpiphanyMachine opened 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
another approach to this:
Api_get(url, errwrap(cb), this)
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