Skip to content

Commit

Permalink
chore(index): Fix typo in comments and whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
lupomontero committed Jul 4, 2022
1 parent 98a38d4 commit b9fcb59
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ internals.rules = require('./data/rules.json').map(function (rule) {


//
// Check is given string ends with `suffix`.
// Check if given string ends with `suffix`.
//
internals.endsWith = function (str, suffix) {

Expand All @@ -40,7 +40,7 @@ internals.findRule = function (domain) {
var punyDomain = Punycode.toASCII(domain);
return internals.rules.reduce(function (memo, rule) {

if (rule.punySuffix === -1){
if (rule.punySuffix === -1) {
rule.punySuffix = Punycode.toASCII(rule.suffix);
}
if (!internals.endsWith(punyDomain, '.' + rule.punySuffix) && punyDomain !== rule.punySuffix) {
Expand Down Expand Up @@ -237,7 +237,7 @@ exports.parse = function (input) {
}

parsed.sld = privateParts.pop();
parsed.domain = [parsed.sld, parsed.tld].join('.');
parsed.domain = [parsed.sld, parsed.tld].join('.');

if (privateParts.length) {
parsed.subdomain = privateParts.join('.');
Expand Down

0 comments on commit b9fcb59

Please sign in to comment.