Install Google It

// Menu: Google
// Description: Query google. Open link.
// Author: johnlindquist
// Twitter: @johnlindquist
//https://www.npmjs.com/package/google-it
let googleIt = await npm("google-it")
let link = await arg("Search Google", async query => {
if (query?.length < 3) return []
return (await googleIt({ query })).map(
({ title, link, snippet }) => ({
name: `${title} + ${link}`,
value: link,
description: snippet,
})
)
})
exec(`open ${link}`)