fossasia/loklak_webclient

View on GitHub
iframely/lib/plugins/system/oembed/knownEndpoints.js

Summary

Maintainability
A
0 mins
Test Coverage
var oembedUtils = require('./oembedUtils');

module.exports = {

    provides: ['oembedLinks', '__noOembedLinks'],

    getData: function(url) {
        var oembedLinks = oembedUtils.findOembedLinks(url);
        return {
            oembedLinks: oembedLinks,
            __noOembedLinks: !oembedLinks || !oembedLinks.length || null    // null - means value not in context.
        };
    }
};