oui-data 1.1.572 → 2.0.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.
Files changed (3) hide show
  1. package/README.md +8 -5
  2. package/index.json +13648 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -7,14 +7,17 @@
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
+ 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:
11
+
10
12
  ```js
11
13
  import ouiData from "oui-data" with {type: "json"};
12
14
 
13
- console.log(ouiData["203706"]);
14
- //=> Cisco Systems, Inc
15
- //=> 80 West Tasman Drive
16
- //=> San Jose CA 94568
17
- //=> United States
15
+ const mac = "C85CE27ABCDE";
16
+ console.log(ouiData[mac.substring(0, 9)] ?? ouiData[mac.substring(0, 7)] ?? ouiData[mac.substring(0, 6)]);
17
+ //=> SYNERGY SYSTEMS AND SOLUTIONS
18
+ //=> A1526, GREEN FIELDS COLONY
19
+ //=> Faridabad HARYANA 121001
20
+ //=> India
18
21
  ```
19
22
 
20
23
  © [silverwind](https://github.com/silverwind), distributed under BSD licence