oui-data 1.1.571 → 1.2.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 +23 -0
- package/index-m.json +6530 -0
- package/index-s.json +7121 -0
- package/index.json +1294 -626
- package/package.json +20 -13
package/README.md
CHANGED
|
@@ -17,4 +17,27 @@ console.log(ouiData["203706"]);
|
|
|
17
17
|
//=> United States
|
|
18
18
|
```
|
|
19
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 |
|
|
29
|
+
|
|
30
|
+
```js
|
|
31
|
+
import maL from "oui-data" with {type: "json"};
|
|
32
|
+
import maM from "oui-data/m" with {type: "json"};
|
|
33
|
+
import maS from "oui-data/s" with {type: "json"};
|
|
34
|
+
|
|
35
|
+
const mac = "C85CE27ABCDE";
|
|
36
|
+
console.log(maS[mac.substring(0, 9)] ?? maM[mac.substring(0, 7)] ?? maL[mac.substring(0, 6)]);
|
|
37
|
+
//=> SYNERGY SYSTEMS AND SOLUTIONS
|
|
38
|
+
//=> A1526, GREEN FIELDS COLONY
|
|
39
|
+
//=> Faridabad HARYANA 121001
|
|
40
|
+
//=> India
|
|
41
|
+
```
|
|
42
|
+
|
|
20
43
|
© [silverwind](https://github.com/silverwind), distributed under BSD licence
|