Skip to content

Not working with async/await? #45

Description

@JBX028

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions