oembed-any

0.1.1 • Public • Published

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);
});

Readme

Keywords

Package Sidebar

Install

npm i oembed-any

Weekly Downloads

0

Version

0.1.1

License

MIT

Last publish

Collaborators

  • notenoughneon