xsburg / vscode-javascript-booster

Sprinkle extra refactorings, code actions and commands over your JavaScript! 🍩 TypeScript and Flow are first class citizens as well!
https://marketplace.visualstudio.com/items?itemName=sburg.vscode-javascript-booster
160 stars 13 forks source link

Convert object literal <-> statements #17

Open mikob opened 5 years ago

mikob commented 5 years ago

Is there any way to convert between these three types of syntaxes?

(object literal)

{
key: 'val',
fn() {
}
}

(statement)

let key = 'val';
function fn() {
}

(class member)

key = val;
fn() {
}