oui-data 1.2.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -23
- package/index.json +17506 -3858
- package/package.json +3 -11
- package/index-m.json +0 -6530
- package/index-s.json +0 -7121
package/README.md
CHANGED
|
@@ -7,33 +7,13 @@
|
|
|
7
7
|
|
|
8
8
|
The module exports a JSON file. Depending on your environment you may need to use [import attributes](https://github.com/tc39/proposal-import-attributes), [import assertions](https://nodejs.org/api/esm.html#import-assertions) or [nothing at all](https://bun.sh/guides/runtime/import-json).
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
import ouiData from "oui-data" with {type: "json"};
|
|
12
|
-
|
|
13
|
-
console.log(ouiData["203706"]);
|
|
14
|
-
//=> Cisco Systems, Inc
|
|
15
|
-
//=> 80 West Tasman Drive
|
|
16
|
-
//=> San Jose CA 94568
|
|
17
|
-
//=> United States
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Registries
|
|
21
|
-
|
|
22
|
-
MA-M and MA-S are subdivisions of MA-L prefixes assigned to `IEEE Registration Authority`, so match the longest prefix first:
|
|
23
|
-
|
|
24
|
-
| Export | Registry | Prefix |
|
|
25
|
-
| ------------------------ | -------- | ----------- |
|
|
26
|
-
| `oui-data`, `oui-data/l` | MA-L | 6 hex chars |
|
|
27
|
-
| `oui-data/m` | MA-M | 7 hex chars |
|
|
28
|
-
| `oui-data/s` | MA-S | 9 hex chars |
|
|
10
|
+
Keys cover all three IEEE registries, MA-L with 6 hex chars, MA-M with 7 and MA-S with 9. MA-M and MA-S are subdivisions of MA-L prefixes assigned to `IEEE Registration Authority`, so match the longest prefix first:
|
|
29
11
|
|
|
30
12
|
```js
|
|
31
|
-
import
|
|
32
|
-
import maM from "oui-data/m" with {type: "json"};
|
|
33
|
-
import maS from "oui-data/s" with {type: "json"};
|
|
13
|
+
import ouiData from "oui-data" with {type: "json"};
|
|
34
14
|
|
|
35
15
|
const mac = "C85CE27ABCDE";
|
|
36
|
-
console.log(
|
|
16
|
+
console.log(ouiData[mac.substring(0, 9)] ?? ouiData[mac.substring(0, 7)] ?? ouiData[mac.substring(0, 6)]);
|
|
37
17
|
//=> SYNERGY SYSTEMS AND SOLUTIONS
|
|
38
18
|
//=> A1526, GREEN FIELDS COLONY
|
|
39
19
|
//=> Faridabad HARYANA 121001
|