msgpackr icon indicating copy to clipboard operation
msgpackr copied to clipboard

packing a `function` returns the same as packing `undefined`

Open Nokel81 opened this issue 3 months ago • 0 comments

Description:

If I run the following code

import { Packr } from "msgpackr";

const packer = new Packr({
  moreTypes: true,
});

const data = packer.unpack(packer.pack(() => 10));

console.log(data); // undefined

I would have expected that it should throw, or at least give me the option to have it throw

Nokel81 avatar Mar 27 '24 12:03 Nokel81