* Performs encode or decode on given content. * @protected * @param {Chain} content * @param {boolean} isEncode True for encoding, false for decoding * @return {number[]|string|Uint8Array|Chain} Resulting content
(content, isEncode)
| 53 | * @return {number[]|string|Uint8Array|Chain} Resulting content |
| 54 | */ |
| 55 | performTranslate (content, isEncode) { |
| 56 | switch (this.getSettingValue('type')) { |
| 57 | case 'byte': |
| 58 | return content.getBytes().reverse() |
| 59 | |
| 60 | case 'character': |
| 61 | return Chain.join(content.getChars().reverse(), '') |
| 62 | |
| 63 | case 'line': |
| 64 | return Chain.join(content.split(/\r?\n/).reverse(), '\n') |
| 65 | } |
| 66 | } |
| 67 | } |
nothing calls this directly
no test coverage detected