Javascript Beautifier/Formatter
Quotes
Convert the quote characters delimiting strings from either double or single quotes to the other.
Original code
console.log('hello world');
console.log("hello world");
const say = "hey";
console.log(`${say} world`);
none
console.log('hello world');
console.log("hello world");
const say = "hey";
console.log(`${say} world`);
double
console.log("hello world");
console.log("hello world");
const say = "hey";
console.log(`${say} world`);
single
console.log('hello world');
console.log('hello world');
const say = 'hey';
console.log(`${say} world`);
End with comma
If a terminating comma should be inserted into arrays, object literals, and destructured objects.
Original code
var foo = {
    bar:"baz",
    name:"onlinetoolsdev"
}
true
var foo = {
    bar:"baz",
    name:"onlinetoolsdev",
}
false
var foo = {
    bar:"baz",
    name:"onlinetoolsdev"
}
End with semicolon
Insert a semicolon at the end of statements.
Original code
var str1 = "onlinetoolsdev"
var str2 = "onlinetoolsdev";
var method1 = function() {
    console.log(str1)
}
var method2 = function() {
    console.log(str2);
};
method1()
method2();
true
var str1 = "onlinetoolsdev";
var str2 = "onlinetoolsdev";
var method1 = function() {
    console.log(str1);
}
var method2 = function() {
    console.log(str2);
};
method1();
method2();
false
var str1 = "onlinetoolsdev"
var str2 = "onlinetoolsdev"
var method1 = function() {
    console.log(str1)
}
var method2 = function() {
    console.log(str2)
};
method1()
method2()
Top