compact-encoding-net
Advanced tools
Comparing version 1.0.0 to 1.0.1
18
index.js
@@ -50,10 +50,10 @@ const c = require('compact-encoding') | ||
return ( | ||
c.uint16.decode(state).toString(16) + ':' + | ||
c.uint16.decode(state).toString(16) + ':' + | ||
c.uint16.decode(state).toString(16) + ':' + | ||
c.uint16.decode(state).toString(16) + ':' + | ||
c.uint16.decode(state).toString(16) + ':' + | ||
c.uint16.decode(state).toString(16) + ':' + | ||
c.uint16.decode(state).toString(16) + ':' + | ||
c.uint16.decode(state).toString(16) | ||
(state.buffer[state.start++] * 256 + state.buffer[state.start++]).toString(16) + ':' + | ||
(state.buffer[state.start++] * 256 + state.buffer[state.start++]).toString(16) + ':' + | ||
(state.buffer[state.start++] * 256 + state.buffer[state.start++]).toString(16) + ':' + | ||
(state.buffer[state.start++] * 256 + state.buffer[state.start++]).toString(16) + ':' + | ||
(state.buffer[state.start++] * 256 + state.buffer[state.start++]).toString(16) + ':' + | ||
(state.buffer[state.start++] * 256 + state.buffer[state.start++]).toString(16) + ':' + | ||
(state.buffer[state.start++] * 256 + state.buffer[state.start++]).toString(16) + ':' + | ||
(state.buffer[state.start++] * 256 + state.buffer[state.start++]).toString(16) | ||
) | ||
@@ -110,4 +110,4 @@ } | ||
state.buffer[state.start++] = n >>> 8 | ||
state.buffer[state.start++] = n | ||
state.buffer[state.start++] = n >>> 8 | ||
@@ -114,0 +114,0 @@ if (i < string.length && string.charCodeAt(i) === /* : */ 0x3a) { |
{ | ||
"name": "compact-encoding-net", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Compact codecs for net types", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -38,2 +38,4 @@ # compact-encoding-net | ||
> :warning: The codec is only defined for valid IPv4 addresses. | ||
```js | ||
@@ -81,2 +83,4 @@ const { ipv4 } = require('compact-encoding-net') | ||
> :warning: The codec is only defined for valid IPv6 addresses. | ||
```js | ||
@@ -83,0 +87,0 @@ const { ipv6 } = require('compact-encoding-net') |
Sorry, the diff of this file is not supported yet
9269
125