Two common ways to destruct modules is Node.js

Destructuring in CJS

const {stdin: input, stdout: output} = require('process');

// Example exploiting Readline
const rl_cjs = readline.createInterface({
    input: process.stdin,
    output: process.stdout
});

Destructuring in ESM

import { stdin as input, stdout as output } from 'process';

// Example exploiting Readline
const rl_esm = readline.createInterface({ input, output });

If any typos found and (or) suggestions could be made, please leave it in the comment section below . Thank you and see you in the next one !