152 .attr('xmlns', 'http://www.w3.org/2000/svg')
153 .node(); //.parentNode.innerHTML;
154
155 var doctype = '<?xml version="1.0" standalone="no"?>' + '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">'; 156
157 var source = new XMLSerializer().serializeToString(html);
158 var blob = new Blob([doctype + source], { type: 'image/svg+xml' });
It's unnecessary to concatenate two string literals together, such as:
let foo = "a" + "b";
This code is likely the result of refactoring where a variable was removed from the concatenation (such as "a" + b + "b"). In such a case, the concatenation isn't important and the code can be rewritten as:
let foo = "ab";
let a = `some` + `string`;
// these are the same as "10"
a = '1' + '0';
a = '1' + `0`;
a = `1` + '0';
a = `1` + `0`;
// when a non string is included
let c = a + b;
c = '1' + a;
let a = 1 + '1';
c = 1 - 2;
// when the string concatenation is multiline
c = "foo" + "bar";