How to use the @discoveryjs/discovery/dist/lib.umd.js.Widget function in @discoveryjs/discovery

To help you get started, we’ve selected a few @discoveryjs/discovery examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github discoveryjs / browser-extension-json-discovery / src / content / inject.js View on Github external
function initDiscovery(options) {
    const { settings } = options;
    const discovery = new Widget(options.wrapper);

    discovery.apply(router);
    discovery.apply(complexViews);

    settingsPage(discovery);

    discovery.page.define('default', [
        {
            view: 'struct',
            expanded: parseInt(settings.expandLevel, 10) || 0
        }
    ]);

    discovery.view.define('raw', el => {
        const { raw } = discovery.context;
        const div = document.createElement('div');
github discoveryjs / browser-extension-json-discovery / src / content / index.js View on Github external
function initDiscovery(settings) {
    const discovery = new Widget(document.body);

    discovery.apply(router);
    discovery.apply(complexViews);

    discovery.page.define('default', [
        {
            view: 'struct',
            expanded: parseInt(settings.expandLevel, 10) || 0
        }
    ]);

    discovery.view.define('raw', el => {
        const { raw } = discovery.context;
        const div = document.createElement('div');

        div.classList.add('user-select');

@discoveryjs/discovery

Frontend framework for rapid data (JSON) analysis, shareable serverless reports and dashboards

MIT
Latest version published 5 days ago

Package Health Score

69 / 100
Full package analysis

Similar packages