ioredis-mock icon indicating copy to clipboard operation
ioredis-mock copied to clipboard

`cmsgpack` global object is missing in lua context

Open felixmosh opened this issue 3 years ago • 4 comments

cmsgpack is a global lua object which allows to pack & unpack messagepacks. It is a standard object that redis adds, therefore, in my opinion it is better to add it as this mock adds the redis global object.

A possible js implementation of cmsgpack can be msgpackr

This code should work:

local packed = cmsgpack.pack('{"some": "obj"}');
return cmsgpack.unpack(packed);

felixmosh avatar Jan 31 '22 12:01 felixmosh

I tried to setup an experiment with it but it's painfully obvious that Lua isn't my forte 😭

stipsan avatar Feb 01 '22 22:02 stipsan

Hi, there is any progress with this?

felixmosh avatar Jul 05 '22 14:07 felixmosh