Change awaitLet note
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
(for file (Fs.readdirSync sourceDir)
|
(for file (Fs.readdirSync sourceDir)
|
||||||
(PDFDocument.load (Fs.readFileSync (+ sourceDir "/" file)))))
|
(PDFDocument.load (Fs.readFileSync (+ sourceDir "/" file)))))
|
||||||
(lambda [inputPdfs]
|
(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 (PDFDocument.create) (lambda [saladPdf]
|
||||||
(.then
|
(.then
|
||||||
(Promise.all
|
(Promise.all
|
||||||
@@ -17,5 +17,3 @@
|
|||||||
(doFor page pages (saladPdf.addPage (first page)))
|
(doFor page pages (saladPdf.addPage (first page)))
|
||||||
(.then (saladPdf.save) (lambda [bytesOut]
|
(.then (saladPdf.save) (lambda [bytesOut]
|
||||||
(Fs.writeFileSync "out.pdf" bytesOut)))))))))))
|
(Fs.writeFileSync "out.pdf" bytesOut)))))))))))
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user