ip-utilties 1.4.6 → 1.4.7

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/ip.mjs +6 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ip-utilties",
3
- "version": "1.4.6",
3
+ "version": "1.4.7",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
package/src/ip.mjs CHANGED
@@ -277,6 +277,12 @@ export function reverseArpa(address) {
277
277
  )
278
278
  .split("")
279
279
  .reverse()
280
+ .reduce((all, s) => {
281
+ if (all.length > 0 || s !== "0") {
282
+ all.push(s);
283
+ }
284
+ return all;
285
+ }, [])
280
286
  .join(".") + ".ip6.arpa"
281
287
  );
282
288
  }