3.0.3 • Published 1 year ago

@ctrl/mac-address v3.0.3

Weekly downloads
7
License
MIT
Repository
github
Last release
1 year ago

@ctrl/mac-address npm coverage

Zero dependency typescript port of joyent/node-macaddr and getMac bevry/getmac

Install

npm install @ctrl/mac-address

Use

Example converting a mac address from a string to a number and then a base16 mac address which some apis need.

import { getMAC, parseMAC } from '@ctrl/mac-address';

// Get first non-zero mac address
const mac = getMAC();

// Convert a string mac address to a base16 string
const macNumber = parseMAC(mac).toLong();

// Native js toString convert the number to base 16
const macBase16 = macNumber.toString(16);

See Also

getmac - https://github.com/bevry/getmac

3.0.3

1 year ago

3.0.2

2 years ago

3.0.1

3 years ago

3.0.0

3 years ago

2.1.2

3 years ago

2.1.1

4 years ago

2.1.0

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.2

4 years ago