Thank you for providing such a useful library, but in Japanese locale environment it's not working with following error.
/home/takuya/work/wol/node_modules/ping/lib/parser/mac.js:42
this._times.push(parseFloat(match[1], 10));
^
TypeError: Cannot read property '1' of null
at LinuxParser.MacParser._processBody (/home/takuya/work/wol/node_modules/ping/lib/parser/mac.js:42:42)
at LinuxParser._processBody (/home/takuya/work/wol/node_modules/ping/lib/parser/linux.js:45:38)
at LinuxParser.parser.eat (/home/takuya/work/wol/node_modules/ping/lib/parser/base.js:133:14)
at /home/takuya/work/wol/node_modules/underscore/underscore.js:723:21
at Function.each (/home/takuya/work/wol/node_modules/underscore/underscore.js:1310:9)
at ChildProcess.<anonymous> (/home/takuya/work/wol/node_modules/ping/lib/ping-promise.js:87:12)
at Object.onceWrapper (events.js:422:26)
at ChildProcess.emit (events.js:315:20)
at maybeClose (internal/child_process.js:1051:16)
at Socket.<anonymous> (internal/child_process.js:442:11)
Since ping command supports i18n message translation, some regular expression seems not matching.
Here is my ping results to google.com.
And this is the results when I run ping command with environment variable LANG=C
PING google.com (216.58.197.206) 56(84) bytes of data.
64 bytes from nrt13s48-in-f206.1e100.net (216.58.197.206): icmp_seq=1 ttl=115 time=38.6 ms
64 bytes from nrt13s48-in-f206.1e100.net (216.58.197.206): icmp_seq=2 ttl=115 time=50.9 ms
64 bytes from nrt13s48-in-f206.1e100.net (216.58.197.206): icmp_seq=3 ttl=115 time=23.9 ms
Summary
Thank you for providing such a useful library, but in Japanese locale environment it's not working with following error.
Since ping command supports i18n message translation, some regular expression seems not matching. Here is my ping results to google.com.
And this is the results when I run ping command with environment variable
LANG=C
Environment