npm.io
1.7.0 • Published 3 years ago

npm-ioservice

Licence
MIT
Version
1.7.0
Deps
3
Size
3 kB
Vulns
0
Weekly
0
Stars
1

[ Description ]

  • An NPM package that simplies the readline and IO service.


[ Documentation ]

// Note: This works well in node version 18.
Import IOService from 'npm-ioservice'

(async function() {
  // Create and IO instance.
  const io = IOService.instance();

  // Ask for input.
  // Always await this process.
  const input = await io.question("Value: ");

  // Log the output.
  console.log(input);

  // Exit the io instance.
  io.close();
})();

Keywords