From 8d1371203783193c3dd022f817cca7cd119eb068 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Fri, 4 Dec 2020 20:04:57 -0700 Subject: [PATCH] Change awaitLet note --- projects/pdf-salad/src/Main.kiss | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/projects/pdf-salad/src/Main.kiss b/projects/pdf-salad/src/Main.kiss index 5b4ae1d3..628a9dfc 100644 --- a/projects/pdf-salad/src/Main.kiss +++ b/projects/pdf-salad/src/Main.kiss @@ -5,7 +5,7 @@ (for file (Fs.readdirSync sourceDir) (PDFDocument.load (Fs.readFileSync (+ sourceDir "/" file))))) (lambda [inputPdfs] - // TODO make an awaitLet macro that .thens a promise or all() of promises into a binding + // TODO make an awaitLet macro that .thens a promise or chain of promises (so the bindings are sequential) into a binding (.then (PDFDocument.create) (lambda [saladPdf] (.then (Promise.all @@ -17,5 +17,3 @@ (doFor page pages (saladPdf.addPage (first page))) (.then (saladPdf.save) (lambda [bytesOut] (Fs.writeFileSync "out.pdf" bytesOut))))))))))) - - \ No newline at end of file