Skip to content

Commit 609410e

Browse files
committed
bump major version
1 parent fcd9b80 commit 609410e

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bip21",
3-
"version": "2.0.3",
3+
"version": "3.0.0",
44
"description": "A BIP21 compatible URL encoding utility library",
55
"author": "Daniel Cousens",
66
"license": "MIT",

test/index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { encode, decode as _decode } from '../index.js'
1+
import * as bip21 from '../index.js'
22
import fixtures from './fixtures.json' assert { type: 'json' }
33
const { valid, invalid } = fixtures
44
import tape from 'tape'
@@ -9,9 +9,9 @@ valid.forEach(function (f) {
99
tape('encodes ' + f.uri, function (t) {
1010
let result
1111
if (f.urnScheme) {
12-
result = encode(f.address, f.options, f.urnScheme)
12+
result = bip21.encode(f.address, f.options, f.urnScheme)
1313
} else {
14-
result = encode(f.address, f.options)
14+
result = bip21.encode(f.address, f.options)
1515
}
1616

1717
t.plan(1)
@@ -22,9 +22,9 @@ valid.forEach(function (f) {
2222
tape('decodes ' + f.uri + (f.compliant === false ? ' (non-compliant)' : ''), function (t) {
2323
let decode
2424
if (f.urnScheme) {
25-
decode = _decode(f.uri, f.urnScheme)
25+
decode = bip21.decode(f.uri, f.urnScheme)
2626
} else {
27-
decode = _decode(f.uri)
27+
decode = bip21.decode(f.uri)
2828
}
2929

3030
t.plan(f.options ? 4 : 1)
@@ -42,7 +42,7 @@ invalid.forEach(function (f) {
4242
tape('throws ' + f.exception + ' for ' + f.uri, function (t) {
4343
t.plan(1)
4444
t.throws(function () {
45-
encode(f.address, f.options)
45+
bip21.encode(f.address, f.options)
4646
}, new RegExp(f.exception))
4747
})
4848
}
@@ -51,7 +51,7 @@ invalid.forEach(function (f) {
5151
tape('throws ' + f.exception + ' for ' + f.uri, function (t) {
5252
t.plan(1)
5353
t.throws(function () {
54-
_decode(f.uri)
54+
bip21.decode(f.uri)
5555
}, new RegExp(f.exception))
5656
})
5757
}

0 commit comments

Comments
 (0)