News for hackers. Stuff that matters.
Re:Node v8.0.0 Released by elmigranto on Tuesday May 30, 2017 @06:24PM (#14449049)
A bunch of functions in core return multiple things to callback. A lot more in userland do the same. Spec or not, that is still something that needs to be accounted for.
Re:Node v8.0.0 Released by idbehold on Tuesday May 30, 2017 @06:33PM (#14449107)
Those are handled by `util.promisify()` by having the original function define special properties on itself `Symbol('util.promisify.custom')` and `Symbol('customPromisifyArgs')`. But it's not something handled by default (e.g. resolving an array if the callback gets more than 2 arguments passed to it).
Re:Node v8.0.0 Released by bfred_it on Wednesday May 31, 2017 @07:43AM (#14451711)
But why. If you're gonna take special steps to handle `util.promisify` you might as well just offer a Promised API and skip `util.promisify`