compact-encoding
Advanced tools
+15
-1
@@ -668,3 +668,17 @@ const b4a = require('b4a') | ||
| const port = (exports.port = uint16) | ||
| const port = (exports.port = { | ||
| preencode(state, p) { | ||
| if (!p) throw new Error('Port must be >0 and <65536') | ||
| uint16.preencode(state, p) | ||
| }, | ||
| encode(state, p) { | ||
| if (!p) throw new Error('Port must be >0 and <65536') | ||
| uint16.encode(state, p) | ||
| }, | ||
| decode(state) { | ||
| const p = uint16.decode(state) | ||
| if (!p) throw new Error('Port must be >0 and <65536') | ||
| return p | ||
| } | ||
| }) | ||
@@ -671,0 +685,0 @@ const address = (host, family) => { |
+4
-4
| { | ||
| "name": "compact-encoding", | ||
| "version": "2.19.0", | ||
| "version": "2.19.1", | ||
| "description": "A series of compact encoding schemes for building small and fast parsers and serializers", | ||
@@ -20,3 +20,3 @@ "main": "index.js", | ||
| "type": "git", | ||
| "url": "https://github.com/compact-encoding/compact-encoding.git" | ||
| "url": "https://github.com/holepunchto/compact-encoding.git" | ||
| }, | ||
@@ -26,5 +26,5 @@ "author": "Mathias Buus (@mafintosh)", | ||
| "bugs": { | ||
| "url": "https://github.com/compact-encoding/compact-encoding/issues" | ||
| "url": "https://github.com/holepunchto/compact-encoding/issues" | ||
| }, | ||
| "homepage": "https://github.com/compact-encoding/compact-encoding" | ||
| "homepage": "https://github.com/holepunchto/compact-encoding" | ||
| } |
83054
0.41%2157
0.65%