A tag function that automatically aligns embedded multiline strings.
npm install @danieldietrich/rich-string

!Platform


A tag function that automatically aligns embedded multiline strings.
``bash`
npm i @danieldietrich/rich-string
The module supports ES6 _import_ and CommonJS _require_ style.
`ts
import s from '@danieldietrich/rich-string';
/*
function sayHi(name) {
console.log('Hi ${name}, I hope you are doing well!');
}
*/
const res = generateSayHi(s
console.log('Hi \${name}, I hope you are doing well!');
);
function generateSayHi(body: string): string {
return s
function sayHi(name) {
${body}
}
;``
}
---
Copyright © 2020 by Daniel Dietrich. Released under the MIT license.