Skip to content

Bubble it up 🐠

Compare
Choose a tag to compare
@nicoespeon nicoespeon released this 08 Sep 22:06

Added

  • [New Refactoring] Bubble up If Statement

Changed

Merge If Statements now handles else-ifs

Extract Variable handles Spread Elements better

Consider the following snippet:

console.log({ ...foo.bar });

Before, executing Extract Variable with the cursor of foo would have produced:

const extracted = { ...foo.bar };
console.log(extracted);

Now, you can extract the Spread Element. The result will be:

const extracted = foo.bar;
console.log({ ...extracted });

If your cursor is on the ... symbol however, you will still extract the whole thing.