Skip to content

Feature request: named circular references #43

@valerii15298

Description

@valerii15298

When using util.inspect(myObject)) circular references are named like ref 1, ref 2 etc...
Would be great to have an option for named circular references, something like this:

const stringify = configure({namedCircularReferences: true});
const circular = {a: 1};
circular.circular = circular;
stringify(circular);
// {__ref: "Ref 1", circular: "Ref 1"

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions