README
Wonton
A no-dependeny Node.js library that makes things easier.
What?
The asynchronous nature of Node.js is a fantastic thing in terms of speed. But sometimes, it just doesn't make sense. Take reading a line from the console for example:
const readline = require('readline');
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
let name = "";
rl.question('What's your name? ', (input) => {
name = input;
rl.close();
});
console.log("Your name is: " + name);
This does not work! On top of being super verbose and annoying, it doesn't work! The idea is that with Wanda, the synchronous Node.js library, you can just write:
const wanda = require('wonton');
console.log("What's your name?");
let name = wonton.io.getLine();
console.log("Your name is: " + name);
You'd agree with me in saying that this is far simpler, and while it's not exactly Javascripty, who's ever said that being Javascripty is a good thing?