Comparing version 0.0.4 to 0.0.5
12
index.js
@@ -22,12 +22,4 @@ 'use strict'; | ||
const niamod = domain_name.split('.').reverse().splice(0, 2); | ||
let found = false; | ||
const sld = slds[niamod[0]]; | ||
if (sld !== undefined) { | ||
const N = sld.length; | ||
let i = 0; | ||
do { | ||
found = niamod[1] === sld[i++]; | ||
} while (!found && i < N); | ||
} | ||
return !!found; | ||
}; | ||
return !!sld && sld.indexOf(niamod[1]) >= 0; | ||
} |
{ | ||
"name": "2ldcheck", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Check whether a domain (a string) is a second level domain", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
2983
96