msgpack / msgpack-javascript

@msgpack/msgpack - MessagePack for JavaScript / msgpack.org[JavaScript/TypeScript/ECMA-262]
https://msgpack.org/
ISC License
1.3k stars 162 forks source link

fix #212; Let Encoder#encode() return a copy of the internal buffer #213

Closed gfx closed 2 years ago

gfx commented 2 years ago

This is an intentional behavior but I'll change it because it's confusing.

See #212 and the added tests for details.

codecov-commenter commented 2 years ago

Codecov Report

Merging #213 (f1b3f84) into main (9b4123a) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #213   +/-   ##
=======================================
  Coverage   98.13%   98.13%           
=======================================
  Files          16       16           
  Lines         964      966    +2     
  Branches      206      206           
=======================================
+ Hits          946      948    +2     
  Misses         18       18           
Impacted Files Coverage Δ
src/Encoder.ts 98.00% <100.00%> (+0.01%) :arrow_up:
src/encode.ts 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.