Skip to content

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

Open
@leobastiani

Description

@leobastiani

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() { ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions