simple-readline

A simple readline module for node to read one line asynchronously

Usage no npm install needed!

<script type="module">
  import simpleReadline from 'https://cdn.skypack.dev/simple-readline';
</script>

README

csimple-readline

A simple module to use readline in node

Example

Basic Usage

await readline() // returns a string

Echo input

const readline = require("simple-readline");

(async() => {
  while(true) {
    console.log(await readline());
  }
})();

If two readlines are called at the same time, the one called first will be returned first