Skip to content

Commit 7eb4ab0

Browse files
author
Andrei Igna
committed
Fixed - allow 1 char domain parts
1 parent fc6cfa8 commit 7eb4ab0

File tree

3 files changed

+23
-23
lines changed

3 files changed

+23
-23
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const isDomain = domain => {
2929
}
3030

3131
const labels = punycode.toASCII(domain).split('.').reverse()
32-
const labelTest = /^([a-z0-9-]{2,64}|xn[a-z0-9-]{5,})$/i
32+
const labelTest = /^([a-z0-9-]{1,64}|xn[a-z0-9-]{5,})$/i
3333

3434
return labels.length > 1 && labels.every((label, index) => {
3535
return index ? labelTest.test(label) && !label.startsWith('-') && !label.endsWith('-') : isTld(label)

package-lock.json

Lines changed: 20 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "whoiser",
3-
"version": "1.3.0",
3+
"version": "1.3.1",
44
"description": "Whois info for TLDs, domains and IPs",
55
"main": "index.js",
66
"scripts": {
@@ -23,7 +23,7 @@
2323
},
2424
"homepage": "https://github.com/LayeredStudio/whoiser#readme",
2525
"devDependencies": {
26-
"mocha": "^6.0.0"
26+
"mocha": "^6.0.2"
2727
},
2828
"dependencies": {
2929
"punycode": "^2.1.1"

0 commit comments

Comments
 (0)