compact-encoding 2.16.0 → 2.16.1
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 +4 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -172,7 +172,7 @@ const uint64 = exports.uint64 = {
|
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
exports.int = zigZagInt(uint)
|
|
175
|
+
const int = exports.int = zigZagInt(uint)
|
|
176
176
|
exports.int8 = zigZagInt(uint8)
|
|
177
177
|
exports.int16 = zigZagInt(uint16)
|
|
178
178
|
exports.int24 = zigZagInt(uint24)
|
|
@@ -494,13 +494,13 @@ exports.frame = function frame (enc) {
|
|
|
494
494
|
|
|
495
495
|
exports.date = {
|
|
496
496
|
preencode (state, d) {
|
|
497
|
-
|
|
497
|
+
int.preencode(state, d.getTime())
|
|
498
498
|
},
|
|
499
499
|
encode (state, d) {
|
|
500
|
-
|
|
500
|
+
int.encode(state, d.getTime())
|
|
501
501
|
},
|
|
502
502
|
decode (state, d) {
|
|
503
|
-
return new Date(
|
|
503
|
+
return new Date(int.decode(state))
|
|
504
504
|
}
|
|
505
505
|
}
|
|
506
506
|
|