{"size": 965, "ext": "js", "max_stars_repo_path": "src/javascripts/styleguide.js", "max_stars_repo_name": "rcreate/styleguide", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/javascripts/styleguide.js", "max_issues_repo_name": "rcreate/styleguide", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/javascripts/styleguide.js", "max_forks_repo_name": "rcreate/styleguide", "max_forks_repo_forks_event_min_datetime": "2019-08-20T15:19:52.000Z", "max_forks_repo_forks_event_max_datetime": "2019-08-20T15:19:52.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 28.3823529412, "max_line_length": 75, "alphanum_fraction": 0.5471502591}
'use strict';

window['jQuery'] = require('jquery');
window['$'] = window['jQuery'];
window['Util'] = require('exports?Util!bootstrap/js/dist/util');
require('bootstrap/js/dist/collapse');

window['styleguide'] = window.styleguide || new function () {
        var instances = {};

        this.init = function(){
            loadModule('sidebar', '[data-toggle=sidebar]');
        };

        this.getInstance = function(name, selector) {
            return instances[name][selector.toString()];
        };

        this.getInstanceCollection = function(name) {
            return instances[name]
        };

        var loadModule = function (name, selector) {
            var $target = $(selector);
            if( $target.length ) {
                var module = require('./modules/'+name);
                instances[name] = {};
                instances[name][selector.toString()] = new module($target);
            }
        }
    };

window.styleguide.init();
