Web Worker support
Want to use this lib in a WebWorker, but there's a line using window object, which is not exists in WebWorker.
I would like to vote for this too. I am trying to use it in QuickJS but have the same issue.
./qjs -I msgpack.min.js
ReferenceError: 'window' is not defined
at <anonymous> (msgpack.min.js)
at <eval> (msgpack.min.js)
I know nothing about web workers, but you might need to adjust the end of the file, where it exports the functions, to your needs. Feel free to create a PR, although I'd need to accept it blindly because I'm not using web workers anywhere.
I recently discovered this library (I started coding my own, because I wanted a lightweight simple object binary serializer/deserializer for a webapp, glad I discovered it before I started messing with arrays, which were giving me headaches already!). It does exactly what I needed, thank you :-)
I'm quite used to web workers I'll be doing a PR soon to solve this, it's trivial and it will increase the performance a lot, specially with big files.