string-to-template-literal
Encode strings to JavaScript template literals.
Installation
yarn add string-to-template-literal
Usage
import convert from 'string-to-template-literal';
convert('AB`C` ${');
// `AB\`C\` \${`
Encode a string to a JavaScript template literal
Encode strings to JavaScript template literals.
yarn add string-to-template-literal
import convert from 'string-to-template-literal';
convert('AB`C` ${');
// `AB\`C\` \${`
Encode a string to a JavaScript template literal
BSD Zero Clause License