UNPKG

foxts

Version:

Opinionated collection of common TypeScript utils by @SukkaW

2 lines (1 loc) 150 B
function e(e){for(let n=0,r=e.length;n<r;n++){let r=e[n];if("\n"===r)break;if("\r"===r&&"\n"===e[n+1])return"\r\n"}return"\n"}export{e as detectEol};