( octets: MacAddressOctets )
| 906 | * @since 4.0.0 |
| 907 | */ |
| 908 | export const macAddressFromOctets = ( |
| 909 | octets: MacAddressOctets |
| 910 | ): Result.Result<MacAddress, NetAddressError> => { |
| 911 | if (!allIntegersInRange(octets, 255)) { |
| 912 | return addressError(octets, "octets must be integers from 0 through 255") |
| 913 | } |
| 914 | return Result.succeed(makeMac(new Uint8Array(octets))) |
| 915 | } |
| 916 | |
| 917 | /** |
| 918 | * Parses a colon-separated MAC address containing six two-digit hexadecimal octets. |
no test coverage detected