const LinkPreview = require('link-preview')
LinkPreview.search('www.google.com', (data) => {
console.log(data); // { img: '', title: '', description: '', link: ''}
}, () => {
console.log('Error');
});
npm install node-link-preview
Library to return title, description and highlighted image of a site to generate a link preview.
JavaScript
const LinkPreview = require('link-preview')
LinkPreview.search('www.google.com', (data) => {
console.log(data); // { img: '', title: '', description: '', link: ''}
}, () => {
console.log('Error');
});
npm install node-link-preview