Skip to content

uneval doesn't support all types when deduplicating references #138

@mrkishi

Description

@mrkishi

uneval's reference deduplication doesn't take into account all the supported types (eg. typed arrays), mangling them in the process:

const array = new Uint8Array([1, 2, 3]);
const data = {
	source: array,
	reference: array,
};

const output = uneval(data);

// output === '(function(a){a["0"]=1;a["1"]=2;a["2"]=3;return {source:a,reference:a}}({}))'

See interactive playground.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions