oui-data provides the IEEE Organizationally Unique Identifier (OUI) database as a static JSON file, enabling programmatic access to MAC address vendor information. The current stable version is 1.1.571. This package primarily serves as a data source, with updates typically tied to upstream IEEE OUI registry changes and dependency bumps, implying an as-needed release cadence rather than a fixed schedule. Its key differentiator is simplicity and direct JSON export, making it easy to consume in environments that support JSON module imports or require/import raw JSON. It eschews any processing logic or API, focusing solely on delivering the raw, structured OUI data.
npm install oui-dataVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to import the oui-data JSON and perform a lookup for a specific OUI to retrieve vendor information, handling both found and not-found cases.
Use `import ouiData from 'oui-data' with {type: 'json'};` for modern environments, or `import ouiData from 'oui-data' assert {type: 'json'};` for older Node.js/bundlers. For CommonJS, `const ouiData = require('oui-data');` works universally.Access properties like `ouiData['203706']` directly. Do not expect methods or classes.
Convert your OUI string to uppercase before using it as a key: `ouiData[yourOUI.toUpperCase()]`.
For CommonJS, use `const ouiData = require('oui-data');`. For ESM, check your Node.js version (needs >=17.1 for assertions) or bundler configuration to ensure support for JSON modules. You might need to directly import `oui-data/index.json` and configure your bundler to handle it as raw JSON.Verify that the OUI string you are using is valid and uppercase. Always check if the lookup result is `undefined` before accessing its properties: `const entry = ouiData[oui.toUpperCase()]; if (entry) { /* ... */ }`.No dependency data recorded yet.