How to use the ping.promise.probe function in ping

To help you get started, we’ve selected a few ping examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github WFCD / genesis / src / commands / Core / Ping.js View on Github external
hosts.forEach((host) => {
      ping.probe(host)
        .then((result) => {
          results.push({
            name: host,
            value: `${result.alive ? '\\✅' : '\\❎'} ${typeof result.time !== 'undefined' && result.time !== 'unknown' ? result.time : '--'}ms`,
          });
        });
    });

ping

a simple wrapper for ping

MIT
Latest version published 2 years ago

Package Health Score

59 / 100
Full package analysis