@mi-sec/mac-address

    1.0.16 • Public • Published

    @mi-sec/mac-address

    MAC Address utility for parsing and validating MAC Addresses

    • Cross-platform - Support for:
      • CommonJS, ECMAScript Modules and UMD builds
      • Node >= 13.2.x (8, 10, 12 in progress)

    mac-address unit test mac-address lint test

    npm version lerna

    Usage

    import macAddress from '@mi-sec/mac-address';
    
    macAddress( '12:34:56:78:90:AB' ) -> <Buffer 12 34 56 78 90 ab>
    macAddress( '12-34-56-78-90-AB' ) -> <Buffer 12 34 56 78 90 ab>
    macAddress( '1234567890AB' ) -> <Buffer 12 34 56 78 90 ab>
    macAddress( 0x1234567890AB ) -> <Buffer 12 34 56 78 90 ab>
    macAddress( 20015998341291 ) -> <Buffer 12 34 56 78 90 ab>
    
    import { isValidMACAddress } from '@mi-sec/mac-address';
    
    isValidMACAddress( '12:34:56:78:90:AB' ) -> true
    isValidMACAddress( '1234567890ZZ' ) -> false
    

    Install

    npm i @mi-sec/mac-address

    DownloadsWeekly Downloads

    93

    Version

    1.0.16

    License

    MIT

    Unpacked Size

    5.79 kB

    Total Files

    5

    Last publish

    Collaborators

    • codebuddha