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.
Files changed (2) hide show
  1. package/index.js +1 -15
  2. 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 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "compact-encoding",
3
- "version": "2.19.1",
3
+ "version": "2.19.2",
4
4
  "description": "A series of compact encoding schemes for building small and fast parsers and serializers",
5
5
  "main": "index.js",
6
6
  "dependencies": {