const os = require('os');

module.exports = function () {
    let mac = os.networkInterfaces();

    for ( let key in mac ) {
        if ( mac[key][0].mac ) {
            mac = mac[key][0].mac;

            break;
        }
    }

    if ( typeof mac !== 'string' ) {
        mac = '';
    }

    return mac;
};