UNPKG

poseidon

Version:

Simplify Node Callback APIs with an optimized promise layer that doesnt compromise on performance.

16 lines (10 loc) 256 B
class ModuleB constructor: -> callbackFunction: (cb) -> cb(null, 'foo') callbackFunction2: (val, cb) -> if val is 1 then cb(null, 'foo') else cb(new Error('Module error'), null) chainableFunction: -> @ module.exports = ModuleB