How to use the navigation/menu.sortMenu function in navigation

To help you get started, we’ve selected a few navigation 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 binary-com / webtrader / src / instruments / instruments.es6 View on Github external
return {
                            display_name: sm.display_name,
                            instruments: sm.instruments.filter(function(ins) {
                                return active_symbols.indexOf(ins.symbol) !== -1;
                            })
                        }
                    }).filter(function(sm) {
                        return sm.instruments.length !== 0;
                    })
                }
            }).filter(function(m) {
                return m.submarkets.length !== 0;
            });

            //console.warn(markets, chartable_markets);
            markets = menu.sortMenu(markets);

            const instruments = $("#nav-menu").find(".instruments");
            instruments.find('> ul').remove();
            menu.refreshMenu(instruments , markets, onMenuItemClick);
        });
}