Generate a random Mac Address
JavaScript
Switch branches/tags
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin Adding bin program and bumping version Jun 17, 2012
examples Initial commit Jun 4, 2012
tests Adding better tests Jun 22, 2012
.gitignore Initial commit Jun 4, 2012
README.md Touching up documentation Jun 19, 2012
index.js Initial commit Jun 4, 2012
package.json Version bump Jul 7, 2012

README.md

random-mac

Generate a random Mac Address

Install

Install for local use as a module

npm install random-mac

Install globally to use the command line tool random-mac(1)

npm install -g random-mac

Usage

module

var randomMac = require('random-mac');

command line

~$ random-mac
54:52:00:6f:56:c2
~$ random-mac 00:11:22
00:11:22:ce:ae:07

Example

> var randomMac = require('random-mac');
undefined
> randomMac()
'54:52:00:2d:45:4b'
> randomMac()
'54:52:00:66:8d:10'
> randomMac('00:11:22')
'00:11:22:09:66:7c'
>
~$ examples/random-mac.js
54:52:00:a3:c7:ab

License

MIT Licensed