forked from KaKi87/sshception
16 lines
No EOL
334 B
JavaScript
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');
|
|
}
|
|
};
|
|
}; |