mac_address_parse.js 207 B

123456789101112
  1. module.exports = {
  2. pad_zeros: (macAddress) => {
  3. if (macAddress) {
  4. return macAddress.split(':')
  5. .map((hex) => hex.padStart(2, '0'))
  6. .join(':')
  7. }
  8. return macAddress
  9. }
  10. }