mac-oui-lookup
Version:
A module that allows you to retrieve the vendor name of a MAC address.
52 lines (37 loc) • 1.82 kB
Markdown
mac-oui-lookup is a Node.js module that allows you to retrieve the vendor name of a MAC address with no internet connection required. The module comes with an up-to-date database of around 50K OUIs directly imported from IEEE registries.
This module has no dependencies and can be easily integrated into your Node.js projects.
[](https://www.npmjs.com/package/mac-oui-lookup)


```
npm install mac-oui-lookup --save
```
```javascript
const { getVendor } = require('mac-oui-lookup');
const vendor = getVendor('00-50-56-BB-FC-8E');
console.log(vendor); // Output: VMware, Inc.
```
```typescript
import getVendor from 'mac-oui-lookup';
const vendor = getVendor('00-50-56-BB-FC-8E');
console.log(vendor); // Output: VMware, Inc.
```
- Fast and efficient vendor name lookup
- Works offline. No internet connection required
- Up-to-date database directly imported from IEEE registries
- Lightweight with no dependencies
Returns the vendor name for the given MAC address.
`macAddress` - The MAC address to lookup. Can be in the format 00:50:56:BB:FC:8E, 00-50-56-BB-FC-8E, or 005056bbfc8e.
Returns the vendor name for the given MAC address as a string. If the vendor name is not found, the function will return null by default. You can provide a default vendor name as a second argument.
The vendor data used by this package is obtained from the IEEE OUI database.
This project is licensed under the MIT License - see the LICENSE file for details.