ip-utilties 3.7.3 → 3.7.4
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 +1 -1
- package/src/ip.mjs +3 -2
- package/types/ip.d.mts +1 -0
package/package.json
CHANGED
package/src/ip.mjs
CHANGED
|
@@ -304,7 +304,7 @@ export function normalizeCIDR(address) {
|
|
|
304
304
|
_prefix(family, encoded, prefixLength),
|
|
305
305
|
prefixLength
|
|
306
306
|
);
|
|
307
|
-
longPrefix = _decode(family,
|
|
307
|
+
longPrefix = _decode(family, encoded);
|
|
308
308
|
} else {
|
|
309
309
|
prefixLength = prefixLength === undefined ? 0 : parseInt(prefixLength);
|
|
310
310
|
|
|
@@ -319,7 +319,8 @@ export function normalizeCIDR(address) {
|
|
|
319
319
|
longPrefix,
|
|
320
320
|
prefix,
|
|
321
321
|
prefixLength,
|
|
322
|
-
cidr: `${prefix}/${prefixLength}
|
|
322
|
+
cidr: `${prefix}/${prefixLength}`,
|
|
323
|
+
family: family.name
|
|
323
324
|
};
|
|
324
325
|
}
|
|
325
326
|
|
package/types/ip.d.mts
CHANGED
|
@@ -45,6 +45,7 @@ export declare function normalizeCIDR(address: any): {
|
|
|
45
45
|
prefix: any;
|
|
46
46
|
prefixLength: any;
|
|
47
47
|
cidr: string;
|
|
48
|
+
family: string;
|
|
48
49
|
};
|
|
49
50
|
export declare function formatCIDR(address: any, prefixLength: any): any;
|
|
50
51
|
export declare function normalizeIP(address: any): string | undefined;
|