Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(instrumenter): support anonymous function names #2388

Merged
merged 1 commit into from
Aug 17, 2020

Commits on Aug 17, 2020

  1. fix(instrumenter): support anonymous function names

    Do a best effort to maintain the `fn.name` property the same when placing mutants in code.
    
    Instrument these:
    
    ```ts
    const foo = function () { }
    const bar = () => {}
    const Baz = class { }
    ```
    
    Like this:
    
    ```ts
    const foo = true? function foo () { }: ...;
    const bar = true? (() => { const bar = () =>{}; return bar } {})() : ...;
    const Baz = true? class Baz { } : ...;
    ```
    nicojs committed Aug 17, 2020
    Configuration menu
    Copy the full SHA
    3d54027 View commit details
    Browse the repository at this point in the history