serialize-javascript icon indicating copy to clipboard operation
serialize-javascript copied to clipboard

Bug when used an object with a function and a variable with a function and destructuring

Open leobastiani opened this issue 4 years ago • 1 comments

https://runkit.com/leobastiani/javascript-serialize-bug-variable-function-destructuring

Try the following code:

const serialize = require("javascript-serialize"); // version 1.6.1
const obj = {
  someKey() {
    const someVariable = ({ someParam }) => {};
  },
};
serialize(obj);

and get: { "someKey": "someKey() { ...

leobastiani avatar May 01 '21 03:05 leobastiani

i ran into this too, to me it happens without the function using destructuring too. (v6.0.0)

jsinterface avatar Jul 12 '21 08:07 jsinterface