({binary, preserveNewlines, readableObjectMode, state})
| 73 | // Unless `preserveNewlines: true` is used, we strip the newline of each line. |
| 74 | // This re-adds them after the user `transform` code has run. |
| 75 | export const getAppendNewlineGenerator = ({binary, preserveNewlines, readableObjectMode, state}) => binary || preserveNewlines || readableObjectMode |
| 76 | ? undefined |
| 77 | : {transform: appendNewlineGenerator.bind(undefined, state)}; |
| 78 | |
| 79 | const appendNewlineGenerator = function * ({isWindowsNewline = false}, chunk) { |
| 80 | const {unixNewline, windowsNewline, LF, concatBytes} = typeof chunk === 'string' ? linesStringInfo : linesUint8ArrayInfo; |
no outgoing calls
no test coverage detected