UNPKG

iframely

Version:

oEmbed/2 gateway endpoint. Get embed data for various http links through one self-hosted API

17 lines (14 loc) 350 B
import cheerio from 'cheerio'; export default { getMeta: function(oembed) { if (oembed.description) { var $p = cheerio('<p>'); try { $p.html(oembed.description); return { description: $p.text() }; } catch (ex) {} } } };