index.js
function getInterfaceMAC (device) {
  if (process.platform === 'darwin' || process.platform === 'linux') {
    let output
    try {
      output = cp.execSync(quote(['ifconfig', device]), { stdio: 'pipe' }).toString()
    } catch (err) {
      return null
    }

    const address = MAC_ADDRESS_RE.exec(output)
    return address && normalize(address[0])
  } else if (process.platform === 'win32') {
    console.error('No windows support for this method yet - PR welcome!')
  }
}
function getInterfaceMAC (device) {
  if (process.platform === 'darwin' || process.platform === 'linux') {
    let output
    try {
      output = cp.execSync(quote(['ifconfig', device]), { stdio: 'pipe' }).toString()
    } catch (err) {
      return null
    }

    const address = MAC_ADDRESS_RE.exec(output)
    return address && normalize(address[0])
  } else if (process.platform === 'win32') {
    console.error('No windows support for this method yet - PR welcome!')
  }
}
function getInterfaceMAC ( device ) { if ( process . platform === 'darwin' || process . platform === 'linux' ) { let output try { output = cp . execSync ( quote ( [ 'ifconfig' , device ] ) , { stdio : 'pipe' } ) . toString ( ) } catch ( err ) { return null } const address = MAC_ADDRESS_RE . exec ( output ) return address && normalize ( address [ 0 ] ) } else if ( process . platform === 'win32' ) { console . error ( 'No windows support for this method yet - PR welcome!' ) } }
Returns currently-set MAC address of given interface. This is distinct from the
interface's hardware MAC address.
@return {string}
Returns currently - set MAC address of given interface . This is distinct from the interface s hardware MAC address .