This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const NodeClam = require('clamscan'); | |
module.exports = async function scanFile(filePath) { | |
console.log(`Attempting virus scan for ${filePath}`); | |
const clamscan = await new NodeClam().init({ | |
remove_infected: true, | |
debug_mode: false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const pdfMakePrinter = require('pdfmake/src/printer'); | |
function generatePdf(docDefinition, callback) => { | |
try { | |
const fontDescriptors = { ... }; | |
const printer = new pdfMakePrinter(fontDescriptors); | |
const doc = printer.createPdfKitDocument(docDefinition); | |
let chunks = []; | |
const result; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": [ | |
"Afghanistan", | |
"Akrotiri", | |
"Albania", | |
"Algeria", | |
"American Samoa", | |
"Andorra", | |
"Angola", | |
"Anguilla", |
OlderNewer