Skip to content

Commit 1709b58

Browse files
committed
feat: replace process.stdout.write to console.log
1 parent 7c3fc73 commit 1709b58

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Roadmap/20 - PETICIONES HTTP/typescript/EdiedRamos.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,20 +154,18 @@ class PokemonService {
154154
}
155155

156156
function menu() {
157-
process.stdout.write(
158-
"Ingrese el nombre o id del pokémon (o 'salir' para terminar): "
159-
);
157+
console.log("Ingrese el nombre o id del pokémon (o 'salir' para terminar): ");
160158

161159
process.stdin.on("data", async (data: string) => {
162160
const input = data.toString().trim().toLowerCase();
163161

164162
if (input === "salir") {
165-
process.stdout.write("Saliendo del programa...\n");
163+
console.log("Saliendo del programa...\n");
166164
process.stdin.close();
167165
} else {
168166
const information = await PokemonService.searchInformation(input);
169167
console.log(information);
170-
process.stdout.write(
168+
console.log(
171169
"Ingrese el nombre o id del pokémon (o 'salir' para terminar): "
172170
);
173171
}

0 commit comments

Comments
 (0)