* Inverses the case of each character. * @param {Chain} content Content to be transformed * @return {Chain} Transformed content
(content)
| 110 | * @return {Chain} Transformed content |
| 111 | */ |
| 112 | _inverseCase (content) { |
| 113 | return Chain.wrap( |
| 114 | content.getChars() |
| 115 | .map(char => { |
| 116 | const lowerChar = char.toLowerCase() |
| 117 | return char !== lowerChar ? lowerChar : char.toUpperCase() |
| 118 | }) |
| 119 | .join('') |
| 120 | ) |
| 121 | } |
| 122 | } |
no test coverage detected