From 938da697c1985421ffd58c10c0de1727d10efd16 Mon Sep 17 00:00:00 2001 From: Kiara Grouwstra Date: Mon, 27 Feb 2023 20:44:54 +0100 Subject: [PATCH] print without breaklines --- src/mollie.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mollie.ts b/src/mollie.ts index 01b82c3..c0b7e75 100644 --- a/src/mollie.ts +++ b/src/mollie.ts @@ -1,4 +1,5 @@ "use strict"; +import { stdout } from 'node:process'; import { List } from "@mollie/api-client"; export const mollieKeys = { @@ -8,7 +9,7 @@ export const mollieKeys = { export async function listAll(list$: Promise>, ms: number = 1000): Promise { const list = await list$; const { count, nextPage, links } = list; - console.log('.'); + process.stdout.write('.'); await new Promise(resolve => setTimeout(resolve, ms)); const rest = await (nextPage ? listAll(nextPage()) : Promise.resolve([])); return [...list, ...rest];