| 5 | const lines = text.split('\n'); |
| 6 | |
| 7 | const rot13 = s => s.split('').map(function(char, index, chars) { |
| 8 | if (chars[index - 1] === '\\') { return char } |
| 9 | if (!char.match(/[A-Za-z]/)) { return char } |
| 10 | const c = Math.floor(char.charCodeAt(0) / 97); |
| 11 | const k = ((char.toLowerCase().charCodeAt(0) - 83) % 26) || 26; |
| 12 | return String.fromCharCode(k + ((c === 0) ? 64 : 96)); |
| 13 | }).join(''); |
| 14 | |
| 15 | const output = lines.map(function(line, index) { |
| 16 | if (index === 0) { |
no outgoing calls
no test coverage detected