EUI-48 MAC address parsing and stringification.
Sister package to @hertzg/ip — same shape,
single concern: convert between the canonical 17-character text form
(aa:bb:cc:dd:ee:ff or AA-BB-CC-DD-EE-FF) and the 6-byte binary form.
The functions are intentionally named parse and stringify
(not parseMac/stringifyMac) so callers can pick a name that fits the
surrounding code:
// namespace import — short call sites import * as mac from "@hertzg/mac"; mac.parse("aa:bb:cc:dd:ee:ff"); // aliased named import — disambiguates when mixing with @hertzg/ip import { parse as parseMac, stringify as stringifyMac } from "@hertzg/mac"; parseMac("aa:bb:cc:dd:ee:ff");