(converter, options, callback)
| 201 | } |
| 202 | |
| 203 | function convertStream(converter, options, callback) { |
| 204 | if (isSameFile(options.input, options.output)) { |
| 205 | throw new Error('Input and output refer to the same file.'); |
| 206 | } |
| 207 | |
| 208 | const input = options.input ? fs.createReadStream(options.input) : process.stdin; |
| 209 | const output = options.output ? fs.createWriteStream(options.output) : process.stdout; |
| 210 | pipeline(input, createConverterStream(converter), output, callback); |
| 211 | } |
| 212 | |
| 213 | function main() { |
| 214 | let options; |
no test coverage detected