node-ping icon indicating copy to clipboard operation
node-ping copied to clipboard

Common result between node callback and promise style

Open nevercast opened this issue 9 years ago • 2 comments

Currently the callback style only returns an alive boolean,

where the promise resolves with an object containing formally the host and alive, but now also includes the result string as of #23

Would you be open to making the result consistent between the two implementations? If we are changing the callback style result from a boolean to an object it would be a good time to consider an (err, result) callback signature as changing the result type is an API breaking change anyway.

I can write the implementation for this, but a major version increment will be needed.

nevercast avatar Jul 26 '15 22:07 nevercast

I guess this is possible. However, it may break backward compatibility. What do you think? @danielzzz @dougluce

mondwan avatar Apr 20 '16 16:04 mondwan

Im definitely for this one, with a major version change.

dougluce avatar Sep 29 '16 14:09 dougluce