vvo / chainit

Turn an asynchronous JavaScript api into an asynchronous chainable JavaScript api
Other
12 stars 4 forks source link

support for fun(arg, cb) signature when arg is a function #13

Closed kapouer closed 9 years ago

kapouer commented 10 years ago

Hi, it seems https://github.com/vvo/chainit/blob/32369c94cfbd7affbeb31662efba3c5a053138a1/index.js#L109 is a hack to support the case where method accepts a function and a callback as arguments. There is surely an explicit way to tell chainit how to deal with that particular case ?

kapouer commented 10 years ago

Example of workaround: https://github.com/kapouer/node-webkitgtk/commit/2294bc1f88d620e846f4796d21e9e9e92b9eba23