12 lines
221 B
JavaScript
12 lines
221 B
JavaScript
|
'use strict';
|
||
|
|
||
|
const NEW_LINE_SEPARATOR = require('../constants').NEW_LINE_SEPARATOR;
|
||
|
|
||
|
module.exports = {
|
||
|
replaceNewLines
|
||
|
};
|
||
|
|
||
|
function replaceNewLines(str) {
|
||
|
return str.replace(/(\r\n|\n|\r)/g, NEW_LINE_SEPARATOR);
|
||
|
}
|