mac-regex
Advanced tools
Weekly downloads
Readme
A regular expression for matching MAC addresses.
npm i --save mac-regex
var mac = require('mac-regex');
// Exact string option
mac({ exact: true }).test('aa-bb-cc-dd-ee-ff') // => true
mac({ exact: true }).test('aa:bb:cc:dd:ee:ff') // => true
mac({ exact: true }).test('aa:bb:cc:dd:ee:ff ') // => false
mac({ exact: true }).test('kljhsdf') // => false
// Global option (default)
mac().test('aa:bb:cc:dd:ee:ff ') // => true
mac().test('kljhsdf') // => false
'11:22:aa:44:55:33 11:22:aa:44:55:33'.match(mac())
// => ['11:22:aa:44:55:33', '11:22:aa:44:55:33']
MIT
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)Crafted with <3 by John Otander.
FAQs
A regular expression for MAC addresses.
The npm package mac-regex receives a total of 473 weekly downloads. As such, mac-regex popularity was classified as not popular.
We found that mac-regex demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.