Skip to content

Instantly share code, notes, and snippets.

@juliensnz
Last active March 6, 2018 09:58
Show Gist options
  • Save juliensnz/22f6fd2e6682731bc1dfdede5b34053a to your computer and use it in GitHub Desktop.
Save juliensnz/22f6fd2e6682731bc1dfdede5b34053a to your computer and use it in GitHub Desktop.
Kata startup
const stdin = process.openStdin();
const promptMessage = (message = '') => process.stdout.write(`> ${message}`);
promptMessage();
stdin.addListener('data', userInput => {
promptMessage(userInput);
promptMessage();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment