@putout/plugin-convert-template-to-string
🐊Putout plugin adds ability to find and remove useless template string
Last updated a year ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @putout/plugin-convert-template-to-string 
SYNC missed versions from official npm registry.

@putout/plugin-convert-template-to-string NPM version

  • 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

Current Tags

  • 3.0.0                                ...           latest (a year ago)

3 Versions

  • 3.0.0                                ...           a year ago
  • 2.0.0                                ...           2 years ago
  • 1.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (0)
None
Dev Dependencies (7)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |