@putout/plugin-convert-template-to-string
v2.0.0
Published
šPutout plugin adds ability to find and remove useless template string
Downloads
57,898
Maintainers
Readme
@putout/plugin-convert-template-to-string
- Template literals are literals delimited with backticks (`), allowing embedded expressions called substitutions.
- The
String
object is used to represent and manipulate a sequence of characters.(c) MDN
šPutout plugin adds ability to find and convert Template Literals to calling of String
constructor.
Install
npm i @putout/plugin-convert-template-to-string
Rule
{
"rules": {
"convert-template-to-string": "on"
}
}
ā Example of incorrect code
const s = `${a + b}`;
ā Example of correct code
const s = String(a + b);
License
MIT