eslint-config-lemon
Version:
<div align="center"> <br> <img width="400" src="logo.svg"> <br> <br> </div>
14 lines (10 loc) • 377 B
JavaScript
;
module.exports = string => string.replace(/^[\r\n]+/, '').replace(/[\r\n]+$/, '');
module.exports.start = string => string.replace(/^[\r\n]+/, '');
module.exports.end = string => {
let end = string.length;
while (end > 0 && (string[end - 1] === '\r' || string[end - 1] === '\n')) {
end--;
}
return end < string.length ? string.slice(0, end) : string;
};