pmcf 2.11.4 → 2.11.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "2.11.4",
3
+ "version": "2.11.5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/utils.mjs CHANGED
@@ -87,12 +87,13 @@ export function isIPv4Address(address) {
87
87
  return false;
88
88
  }
89
89
 
90
- export function generateEU64(mac) {
91
- //TODO
92
- }
93
-
94
90
  export function isIPv6Address(address) {
95
- return address.indexOf(":") >= 0;
91
+ switch (typeof address) {
92
+ case "string":
93
+ return address.indexOf(":") >= 0;
94
+ }
95
+
96
+ return false;
96
97
  }
97
98
 
98
99
  export function isLinkLocal(address) {
@@ -107,6 +108,10 @@ export function isLinkLocal(address) {
107
108
  return false;
108
109
  }
109
110
 
111
+ export function generateEU64(mac) {
112
+ //TODO
113
+ }
114
+
110
115
  export function isLocalhost(address) {
111
116
  const eaddr = encodeIP(address);
112
117
  return eaddr === IPV4_LOCALHOST || eaddr === IPV6_LOCALHOST;
package/types/utils.d.mts CHANGED
@@ -6,9 +6,9 @@ export function bridgeToJSON(bridge: any): any[];
6
6
  export function asArray(value: any): any[];
7
7
  export function asIterator(value: any): any;
8
8
  export function isIPv4Address(address: any): boolean;
9
- export function generateEU64(mac: any): void;
10
9
  export function isIPv6Address(address: any): boolean;
11
10
  export function isLinkLocal(address: any): boolean;
11
+ export function generateEU64(mac: any): void;
12
12
  export function isLocalhost(address: any): boolean;
13
13
  export function normalizeIPAddress(address: any): any;
14
14
  export function addressWithPrefixLength(address: any, prefixLength: any): string;