0.1.1 • Published 7 years ago

oembed-any v0.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

oembed-any

Simple oembed client that works with any url with a published json+oembed link.

If you are displaying html, you probably want to restrict urls to a set of trusted domains to prevent XSS attacks.

API

var oembed = require('oembed-any');

oembed(url): Promise\<any>

Return a promise for the oembed data for url.

Example:

oembed('https://www.youtube.com/watch?v=J---aiyznGQ')
.then(res => {
    console.log(res.html);
});