String.dedent
Less than 1 minute
String.dedent
Module
Types
interface StringConstructor {
dedent(
template: { raw: Array<string> },
...substitutions: Array<any>
): string;
dedent<T>(
tagFunction: (
template: { raw: Array<string> },
...substitutions: Array<any>
) => T
): T;
}
Entry points
core-js/proposals/string-dedent
core-js(-pure)/full/string/dedent
Example
const message = 42;
console.log(String.dedent`
print('${message}')
`); // => print('42')
String.dedent(console.log)`
print('${message}')
`; // => ["print('", "')", raw: Array(2)], 42