embedable

1.0.32 • Public • Published

embedable

Embed media via oEmbed or openGraph

Example of using the embedable code to fetch and render a uri

// Require the embedable library
var Embedable = require('embedable');
 
// Instantiate the embedable object
var embed = Embedable();
 
// Asynchronously fetch metadata for a URI
var data = embed.fetch('https://www.youtube.com/watch?v=igUMDICqTpQ');
 
// Asynchronously render html with the metadata
var html = data.then(function(data) {
  return embed.render(data);
});

Package Sidebar

Install

npm i embedable

Weekly Downloads

0

Version

1.0.32

License

MIT

Last publish

Collaborators

  • nathanknowles
  • numinos1