/**
* LICENSE MIT
* (C) Daniel Zelisko
* http://github.com/danielzzz/node-ping
*
* a simple wrapper for ping
* Now with support of not only english Windows.
*
*/

//system library
var sys = require('util'),
    cp = require('child_process'),
    os = require('os');

// Promise implementation
var ping = require('./ping-promise');

/**
 * Callback after probing given host
 * @callback probeCallback
 * @param {boolean} isAlive - Whether target is alive or not
 * @param {Object} error - Null if no error occurs
 */

/**
 * Class::Ping construtor
 *
 * @param {string} addr - Hostname or ip addres
 * @param {probeCallback} cb - Callback
 * @param {PingConfig} config - Configuration for command ping
 */
function probe(addr, cb, config) {
    // Do not reassign function parameter
    var _config = config || {};

    return ping.probe(addr, _config).then(function (res) {
        cb(res.alive, null);
    }).catch(function (err) {
        cb(null, err);
    }).done();
}

exports.probe = probe;

@@ -1,12 +1,27 @@
+'use strict';%0A%0A
 /**%0A* LICENS
@@ -177,174 +177,197 @@
 %0A%0A//
-system library%0Avar sys = require('util'),%0A    cp = require('child_process'),%0A    os = require('os');%0A%0A// Promise implementation%0Avar ping = require('./ping-promise');%0A
+ Promise implementation%0Avar ping = require('./ping-promise');%0A%0A// TODO:%0A// 1. Port round trip time to this callback%0A// 2. However, it may breaks backward compatability%0A// 3. Need discussion
 %0A/**

Add TODO comment and fix warning from eslint