Closed yamadapc closed 9 years ago
There's probably a way to support async calls, with a clean API. Something like:
/** * @example * something('here', cb) * // async => Error('Yields an error with "here"') * something('there', cb) * // async => 'result' */ function something(arg, cb) { if(arg === 'here') { cb(new Error('Yields an error with "here"'); } else { cb(null, 'result'); } }
There's probably a way to support async calls, with a clean API. Something like: