compact-encoding-net
Advanced tools
Comparing version 1.1.0 to 1.2.0
11
index.js
@@ -5,3 +5,3 @@ const c = require('compact-encoding') | ||
const address = (host) => { | ||
const address = (host, family) => { | ||
return { | ||
@@ -19,2 +19,3 @@ preencode (state, m) { | ||
host: host.decode(state), | ||
family, | ||
port: port.decode(state) | ||
@@ -27,3 +28,3 @@ } | ||
const ipv4 = { | ||
preencode (state, m) { | ||
preencode (state) { | ||
state.end += 4 | ||
@@ -61,6 +62,6 @@ }, | ||
const ipv4Address = address(ipv4) | ||
const ipv4Address = address(ipv4, 4) | ||
const ipv6 = { | ||
preencode (state, m) { | ||
preencode (state) { | ||
state.end += 16 | ||
@@ -118,3 +119,3 @@ }, | ||
const ipv6Address = address(ipv6) | ||
const ipv6Address = address(ipv6, 6) | ||
@@ -121,0 +122,0 @@ const ip = { |
{ | ||
"name": "compact-encoding-net", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Compact codecs for net types", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
12477
8
287
0