@f5devcentral/atg-shared-utilities
Advanced tools
Comparing version 0.4.8 to 0.4.9
@@ -15,2 +15,12 @@ # Changelog | ||
## [0.4.9] 2022-10-06 | ||
### Added | ||
### Fixed | ||
- AUTOTOOL-3505: handle wildcard addresses in minimizeIP | ||
### Changed | ||
### Removed | ||
## [0.4.8] | ||
@@ -17,0 +27,0 @@ ### Added |
{ | ||
"name": "@f5devcentral/atg-shared-utilities", | ||
"version": "0.4.8", | ||
"version": "0.4.9", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "lint": "eslint .", |
@@ -43,3 +43,6 @@ /** | ||
if ((ip === undefined) || (ip === '::') || (ip === '')) { return ip; } | ||
if ((ip === undefined) || (ip === '::') || (ip === '') | ||
|| (ip === 'any') || (ip === 'any6')) { | ||
return ip; | ||
} | ||
@@ -46,0 +49,0 @@ cidr = ip.split('/'); ip = cidr[0]; cidr = cidr[1]; |
@@ -150,3 +150,4 @@ /** | ||
} | ||
const message = `Error decrypting data: ${error}`; throw new Error(message); | ||
const message = `Error decrypting data: ${error}`; | ||
throw new Error(message); | ||
}); | ||
@@ -153,0 +154,0 @@ } |
@@ -32,2 +32,7 @@ /** | ||
it('should return wildcard addresses', () => { | ||
assert.strictEqual(ipUtil.minimizeIP('any'), 'any'); | ||
assert.strictEqual(ipUtil.minimizeIP('any6'), 'any6'); | ||
}); | ||
it('should return valid IPv4 addresses', () => { | ||
@@ -50,2 +55,6 @@ assert.strictEqual(ipUtil.minimizeIP('0.0.0.0/24'), '0.0.0.0/24'); | ||
it('should return valid IPv6 address from IPv4-Mapped address', () => { | ||
assert.strictEqual(ipUtil.minimizeIP('::ffff:10.0.0.1'), '::ffff:a00:1'); | ||
}); | ||
it('should return valid IPv4 address from an octal IP', () => { | ||
@@ -52,0 +61,0 @@ assert.strictEqual(ipUtil.minimizeIP('0127.0.0.1'), '87.0.0.1'); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
114727
2351