Skip to content

Clean up inline assignments #32

@Kyuuhachi

Description

@Kyuuhachi

The following code

var r,i=(r=n(224736))&&r.__esModule?r:{default:r};

is unminified to

var r;
var i = (r = n(224736)) && r.__esModule ? r : {default: r};

It would be nice if it could be rewritten as

var r = n(224736);
var i = r && r.__esModule ? r : {default: r};

One would have to be careful that this doesn't affect evaluation order, but I've seen that pattern often enough that it would be nice to have it fixed. I've seen similar things with if statements, var bi; if((bi=foo())===null||bi===void 0){, too.

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