linkpreview-simple

1.0.1 • Public • Published

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'
}

/linkpreview-simple/

    Package Sidebar

    Install

    npm i linkpreview-simple

    Weekly Downloads

    1

    Version

    1.0.1

    License

    ISC

    Unpacked Size

    2.87 kB

    Total Files

    4

    Last publish

    Collaborators

    • yoannchb