Get the mac address of the current machine you are on.
- Install Node.js
- Install it locally via:
npm install getmac
- Try it globally with:
npm install -g getmac
andgetmac-node
// Fetch the computer's mac address
require('getmac').getMac(function(err,macAddress){
if (err) throw err;
console.log(macAddress);
});
// Validate that an address is a mac address
if ( require('getmac').isMac("e4:ce:8f:5b:a7:fc") ) {
console.log('valid mac');
}
else {
console.log('invalid mac');
}
You can discover the history inside the History.md file
Licensed under the incredibly permissive MIT License
Copyright © 2013+ Bevry Pty Ltd us@bevry.me