Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
zekth committed Dec 2, 2021
1 parent 96ef89d commit a402311
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function stripLeadingZeros (str, token) {
const c = str[i]
if (c === '0' && skip) {
if ((i + 1 <= l && str[i + 1] === token) || i + 1 === l) {
out += c
out += c
skip = false
}
} else {
Expand All @@ -124,7 +124,7 @@ function stripLeadingZeros (str, token) {
} else {
skip = false
}
out += c
out += c
}
}
return out
Expand Down
6 changes: 3 additions & 3 deletions test/parse.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ test('URI parse', (t) => {

// invalid IPv6
components = URI.parse('//[2001:dbZ::7]')
t.equal(components.host,'[2001:dbz::7]')
t.equal(components.host, '[2001:dbz::7]')

// mixed IPv4address & IPv6address
components = URI.parse('//[::ffff:129.144.52.38]')
Expand Down Expand Up @@ -302,9 +302,9 @@ test('URI parse', (t) => {
t.equal(components.nss, 'a123,456', 'nss')

components = URI.parse('//[2606:2800:220:1:248:1893:25c8:1946:43209]')
t.equal(components.host,"[2606:2800:220:1:248:1893:25c8:1946:43209]")
t.equal(components.host, '[2606:2800:220:1:248:1893:25c8:1946:43209]')

components = URI.parse('urn:foo:|\\24fpl')
t.equal(components.error,'URN can not be parsed.')
t.equal(components.error, 'URN can not be parsed.')
t.end()
})

0 comments on commit a402311

Please sign in to comment.