When a ping node is used, if it is successful in pinging, it returns time (number) for ping, however if not it returns a boolean (false). So output is either a boolean or a number. That makes it bit cumbersome to process the output (i.e. using a RBE node to check if a target is not accessible or becomes accessible again). Would it make sense to have payload type be consistent. i.e.
either have a negative number if host is not reachable and a positive number with actual ping time if successful.
or true/false if ping is successful/failed and a separate value for ping time ?
The ping node is written to use the users operating systems commands for ping. This is not all done in JS. Because the command can fail due to timing out, or error code, response false is used to control the response to node-red. Making something false in JS is useful to keep code down because you can place a var in a if statement.
var result = false;
if (result) {do stuff here if its not false}
this way if the command fails or times out no result(value of ping) replaces the result that was set to false.
I like the way ping node is now and have no want to add a bunch of over head code to cover the issue you described. But feel free to offer a pull request to the big wigs and see if they like your path/solution.