sshception/lib/createPassthroughStream.js
2023-01-09 19:29:17 +01:00

16 lines
No EOL
334 B
JavaScript

import {
PassThrough
} from 'node:stream';
export default () => {
const stdin = new PassThrough();
return {
stdin,
stdout: new PassThrough(),
setSize: ({ rows, columns }) => {
stdin.rows = rows;
stdin.columns = columns;
stdin.emit('resize');
}
};
};