To trim or not to trim

October 29, 2020 @WAT

That is the question!

const replaceLineBreaksBeforeAndAfterString = /^\s+|\s+$/g;
const replaceLineBreaks = ((currentString: string) => currentString.replace(replaceLineBreaksBeforeAndAfterString, ''));