msgpack5 4.0.1 → 4.2.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/.travis.yml +1 -0
- package/README.md +10 -2
- package/dist/msgpack5.min.js +1 -1
- package/lib/decoder.js +13 -8
- package/lib/encoder.js +40 -16
- package/lib/streams.js +6 -1
- package/package.json +10 -25
- package/test/1-byte-length-uint8arrays.js +1 -1
- package/test/15-elements-maps.js +10 -0
- package/test/2-bytes-length-uint8arrays.js +1 -1
- package/test/4-bytes-length-uint8arrays.js +1 -1
- package/test/NaN.js +14 -0
- package/test/floats.js +63 -11
- package/test/object-with-many-keys.js +71 -0
- package/test/streams.js +77 -0
- package/test/timestamps.js +6 -6
package/.travis.yml
CHANGED
package/README.md
CHANGED
|
@@ -177,17 +177,25 @@ This is just a commodity that calls
|
|
|
177
177
|
-------------------------------------------------------
|
|
178
178
|
<a name="encoder"></a>
|
|
179
179
|
|
|
180
|
-
### encoder()
|
|
180
|
+
### encoder(options)
|
|
181
181
|
|
|
182
182
|
Builds a stream in object mode that encodes msgpack.
|
|
183
183
|
|
|
184
|
+
Supported options:
|
|
185
|
+
* `wrap`, objects should be passed to encoder in wrapped object {value: data}. Wrap option should be used if you need to pass null to encoder.
|
|
186
|
+
|
|
187
|
+
|
|
184
188
|
-------------------------------------------------------
|
|
185
189
|
<a name="decoder"></a>
|
|
186
190
|
|
|
187
|
-
### decoder()
|
|
191
|
+
### decoder(options)
|
|
188
192
|
|
|
189
193
|
Builds a stream in object mode that decodes msgpack.
|
|
190
194
|
|
|
195
|
+
Supported options:
|
|
196
|
+
* `wrap`, decoded objects returned in wrapped object {value: data}. Wrap option should be used if stream contains msgpack nil.
|
|
197
|
+
|
|
198
|
+
|
|
191
199
|
LevelUp Support
|
|
192
200
|
---------------
|
|
193
201
|
|