Not working with async/await?
JBX028 opened this issue · comments
Baillargeaux commented
Hi,
Can we used this function with async/await? The following code doesn't work for me and I am not able to figure out why because the same approach works with other packages:
const SummaryTool = require('node-summary');
const getTextFromHTML = async (url) => {
return await SummaryTool.summarizeFromUrl(url);
}
const start = async () => {
const source = await getTextFromHTML("https://en.wikipedia.org/wiki/Google");
console.log(source);
}
start()
Thanks