compact-encoding 2.19.1 → 2.19.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -15
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -665,21 +665,7 @@ const any = (exports.any = {
|
|
|
665
665
|
}
|
|
666
666
|
})
|
|
667
667
|
|
|
668
|
-
const port = (exports.port =
|
|
669
|
-
preencode(state, p) {
|
|
670
|
-
if (!p) throw new Error('Port must be >0 and <65536')
|
|
671
|
-
uint16.preencode(state, p)
|
|
672
|
-
},
|
|
673
|
-
encode(state, p) {
|
|
674
|
-
if (!p) throw new Error('Port must be >0 and <65536')
|
|
675
|
-
uint16.encode(state, p)
|
|
676
|
-
},
|
|
677
|
-
decode(state) {
|
|
678
|
-
const p = uint16.decode(state)
|
|
679
|
-
if (!p) throw new Error('Port must be >0 and <65536')
|
|
680
|
-
return p
|
|
681
|
-
}
|
|
682
|
-
})
|
|
668
|
+
const port = (exports.port = uint16)
|
|
683
669
|
|
|
684
670
|
const address = (host, family) => {
|
|
685
671
|
return {
|