git.schokokeks.org
Repositories
Help
Report an Issue
fs-words.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
9815a42
Branches
Tags
develop-client_server
master
typescript
fs-words.git
source
helpers
misc.ts
[add] typescript logic
Christian Fraß
commited
9815a42
at 2021-03-03 00:27:18
misc.ts
Blame
History
Raw
namespace helpers.misc { /** */ export function stdin ( ) : Promise<string> { return ( new Promise<string> ( (resolve, reject) => { const readline = require("readline"); const reader = readline.createInterface ( { "input": process.stdin, "output": process.stdout, "terminal": false } ); let lines : Array<string> = []; reader.on("line", (line) => lines.push(line)); reader.on("close", () => resolve(lines.join("\n"))); } ) ); } }