oembed-parser
Installation
npm install oembed-parser
Usage
const extract = ; let url = 'https://www.youtube.com/watch?v=8jPQjjsBbIc'; // Promise style; // async/await styleconst getArticle = async { try let data = await ; return data; catch err return err; } console;
APIs
.extract(String URL)
Return a Promise object.
.hasProvider(String URL)
Return boolean. True if the URL matches with any provider in the list.
Provider list
List of resource providers is a clone of oembed.com and available here.
Test
git clone https://github.com/ndaidong/oembed-parser.gitcd oembed-parsernpm installnpm test
License
The MIT License (MIT)