7 lines
153 B
JavaScript
7 lines
153 B
JavaScript
function trimNewLine(input) {
|
|
return typeof(input) === 'string' ? input.replace(/\n/g, '') : input;
|
|
}
|
|
|
|
module.exports = {
|
|
trimNewLine: trimNewLine
|
|
}; |