This would be my main use case, but strip-indent
only literally strips the indentation.
const fire = stripIndent(`
THIS IS FINE.
I'M OK WITH THE EVENTS UNFOLDING CURRENTLY.
`);
// => '\nTHIS IS FINE.\nI'M OK WITH THE EVENTS UNFOLDING CURRENTLY.\n'
I'm currently using this instead of strip-indent
but maybe you have a better solution (or can extend strip-indent
)
const fire = `
THIS IS FINE.
I'M OK WITH THE EVENTS UNFOLDING CURRENTLY.
`.replace(/(\n|\b)\t+/g, '$1').trim(); // Strips *all* indentation
// => 'THIS IS FINE.\nI'M OK WITH THE EVENTS UNFOLDING CURRENTLY.'
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too