pmcf 1.43.1 → 1.43.2

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/utils.mjs +5 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "1.43.1",
3
+ "version": "1.43.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/utils.mjs CHANGED
@@ -147,6 +147,9 @@ export function normalizeCIDR(address) {
147
147
  if (n === IPV4_LOCALHOST) {
148
148
  prefixLength = 8;
149
149
  prefix = _decode(definition, n, prefixLength);
150
+ } else if (n === IPV6_LOCALHOST) {
151
+ prefixLength = 127;
152
+ prefix = _decode(definition, n, prefixLength);
150
153
  } else {
151
154
  return {};
152
155
  }
@@ -156,4 +159,5 @@ export function normalizeCIDR(address) {
156
159
  return { prefix, prefixLength, cidr: `${prefix}/${prefixLength}` };
157
160
  }
158
161
 
159
- const IPV4_LOCALHOST = _encode(ipv4,'127.0.0.1')
162
+ const IPV4_LOCALHOST = _encode(ipv4, "127.0.0.1");
163
+ const IPV6_LOCALHOST = _encode(ipv6, "::1");