1.0.1 • Published 4 years ago

linkpreview-simple v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

LinkPreview.js

Install

npm i linkpreview-simple

How to use

const test = require('linkpreview-simple');
(async () => {
    const url = "https://andrejgajdos.com/how-to-create-a-link-preview/";
    let res = await test.getPreview(url);
    console.log(res);
})();

Output

{
  favicon: 'https://andrejgajdos.com/wp-content/uploads/2019/cropped-andrejgajdos.com_-32x32.jpg?x24280',
  title: 'How to Create a Link Preview: The Definite Guide [Implementation and Demo Included] | Andrej Gajdos',
  description: 'The whole strategy of creating link previews, including implementation using open-source libraries in node.js. The whole solution is released as npm package.',
  image: 'https://andrejgajdos.com/wp-content/uploads/2019/11/generating-link-preview-1024x562.png'
}