Skip to content

BitBurner: main.bundle.js #33

@gnordlan

Description

@gnordlan

I attempted to use this tool to unminify the main.bundle.js file that comes with a normal install of BitBurner.

I discovered two issues, and was stuck on the second one.

1st.
return { field1: value1, field2: value2 ... }
The tokenizer in this library fails on the second ":" character. It doesn't understand an "any" object construction with multiple fields following a return. I managed by bypass this by changing a few hundred instances in the source file to:
return new { field1: value1, field2: value2 ... }
Which it handled fine.

2nd.
The output code looked like this:

      function a(e) {
        let e = 1;
        for (let e = 0; e < n; e++) {
            ...
        }
        for (let e = 0; e < t; e++) {
        ...

It is reassigning the variable "e" many times... In many different functions. Too many to fix by hand. I assume it's failing to correctly reassign/map the variable names?

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