Comparing version 0.2.9 to 0.2.10
#!/usr/bin/env node | ||
import * as ip6 from './ip6.js'; | ||
import ip6 from './ip6.js'; | ||
@@ -5,0 +5,0 @@ import { createRequire } from "module"; |
27
ip6.js
/** | ||
* Created by elgs on 3/5/16. | ||
*/ | ||
export const normalize = function (a) { | ||
const normalize = function (a) { | ||
validate(a); | ||
@@ -43,3 +43,3 @@ | ||
export const abbreviate = function (a) { | ||
const abbreviate = function (a) { | ||
validate(a); | ||
@@ -97,3 +97,3 @@ a = normalize(a); | ||
// Basic validation | ||
export const validate = function (a) { | ||
const validate = function (a) { | ||
const ns = []; | ||
@@ -163,3 +163,3 @@ const nh = a.split('::'); | ||
export const divideSubnet = function (addr, mask0, mask1, limit, abbr) { | ||
const divideSubnet = function (addr, mask0, mask1, limit, abbr) { | ||
validate(addr); | ||
@@ -199,3 +199,3 @@ mask0 *= 1; | ||
export const range = function (addr, mask0, mask1, abbr) { | ||
const range = function (addr, mask0, mask1, abbr) { | ||
validate(addr); | ||
@@ -228,3 +228,3 @@ mask0 *= 1; | ||
export const rangeBigInt = function (addr, mask0, mask1, abbr) { | ||
const rangeBigInt = function (addr, mask0, mask1, abbr) { | ||
if (typeof BigInt === 'undefined') { | ||
@@ -261,3 +261,3 @@ return range(addr, mask0, mask1, abbr); | ||
export const randomSubnet = function (addr, mask0, mask1, limit, abbr) { | ||
const randomSubnet = function (addr, mask0, mask1, limit, abbr) { | ||
validate(addr); | ||
@@ -298,3 +298,3 @@ mask0 *= 1; | ||
export const ptr = function (addr, mask) { | ||
const ptr = function (addr, mask) { | ||
validate(addr); | ||
@@ -309,1 +309,12 @@ mask *= 1; | ||
}; | ||
export default { | ||
normalize, | ||
abbreviate, | ||
validate, | ||
divideSubnet, | ||
range, | ||
rangeBigInt, | ||
randomSubnet, | ||
ptr, | ||
}; |
{ | ||
"name": "ip6", | ||
"version": "0.2.9", | ||
"version": "0.2.10", | ||
"description": "IPv6 address helper utilities.", | ||
@@ -5,0 +5,0 @@ "main": "ip6.js", |
@@ -14,3 +14,3 @@ # ip6 | ||
```javascript | ||
let ip6 = require('ip6'); | ||
import ip6 from 'ip6'; | ||
@@ -17,0 +17,0 @@ console.log(ip6.normalize('2404:6800:4003:808::200e')); |
/** | ||
* Created by elgs on 3/5/16. | ||
*/ | ||
import * as ip6 from './ip6.js'; | ||
import ip6 from './ip6.js'; | ||
@@ -6,0 +6,0 @@ //////////////////////////////////////////////////////////////////////////// |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
30004
550
0