List filters from a list of plugins

@param {OrderedMap<String:Plugin>}
@return {Map<String:Function>}
514327
function listFilters(plugins) {
    return plugins
        .reverse()
        .reduce(function(result, plugin) {
            return result.merge(plugin.getFilters());
        }, Immutable.Map());
}
284809
protected function get_sorted_plugins() {
        $pluginmanager = core_plugin_manager::instance();

        $plugins = $pluginmanager->get_plugins_of_type('media');
        $enabledplugins = $pluginmanager->get_enabled_plugins('media');

        // Sort plugins so enabled plugins are displayed first and all others are displayed in the end sorted by rank.
        \core_collator::asort_objects_by_method($plugins, 'get_rank', \core_collator::SORT_NUMERIC);

        $order = array_values($enabledplugins);
        $order = array_merge($order, array_diff(array_reverse(array_keys($plugins)), $order));

        $sortedplugins = array();
        foreach ($order as $name) {
            $sortedplugins[$name] = $plugins[$name];
        }

        return $sortedplugins;
    }
888193
function (fn) {
      var items = this.items;
      var sorted = lazy.sortObject(this.keyMap, {prop: undefined, get: fn});
      var keys = Object.keys(sorted);
      var len = keys.length, i = -1;
      var arr = new Array(len);

      while (++i < len) {
        var key = keys[i];
        arr[i] = items[sorted[key]];
        sorted[key] = i;
      }

      this.items = arr;
      this.keyMap = sorted;
      return this;
    }
1278154
function _withPlugins(fn) {
  return function() {
    const args = Array.from(arguments);
    const opts = args[1] || {};
    args[1] = Object.assign({}, opts, {
      plugins: loadPlugins(opts.plugins, opts.pluginSearchDirs)
    });
    return fn.apply(null, args);
  };
}
343788
function (pluginsPath) {
    var plugins = fs.readdirSync(pluginsPath);
    var loadedPlugin = [];
    plugins.forEach(function (pluginName) {
        if (pluginName !== 'index.js') {
            loadedPlugin.push(require(path.resolve(pluginsPath, path.basename(pluginName, '.js'))));
        }
    });
    return loadedPlugin;
}
865792
function EditList(
    // Options for the plugin
    opts: OptionsFormat = {}
): Object {
    opts = new Options(opts);
    const corePlugin = core(opts);

    return {
        ...corePlugin,

        onKeyDown: onKeyDown.bind(null, opts)
    };
}
375360
function listResources(plugins, resources) {
    return plugins.reduce(function(result, plugin) {
        var npmId           = plugin.getNpmID();
        var pluginResources = resources.get(plugin.getName());

        PLUGIN_RESOURCES.forEach(function(resourceType) {
            var assets = pluginResources.get(resourceType);
            if (!assets) return;

            var list = result.get(resourceType) || Immutable.List();

            assets = assets.map(function(assetFile) {
                if (LocationUtils.isExternal(assetFile)) {
                    return {
                        url: assetFile
                    };
                } else {
                    return {
                        path: LocationUtils.normalize(path.join(npmId, assetFile))
                    };
                }
            });

            list = list.concat(assets);
            result = result.set(resourceType, list);
        });

        return result;
    }, Immutable.Map());
}
171413
function (plugin) {
    var that = this;

    /**
     * DOM element used for updating the status of requests and list counts.
     * @type {jQuery}
     */
    this.$status = $(plugin.options.templates.status).hide().appendTo(plugin.selectpicker.$menu);
    var statusInitialized = plugin.t('statusInitialized');
    if (statusInitialized && statusInitialized.length) {
        this.setStatus(statusInitialized);
    }

    /**
     * Container for cached data.
     * @type {Object}
     */
    this.cache = {};

    /**
     * Reference the plugin for internal use.
     * @type {AjaxBootstrapSelect}
     */
    this.plugin = plugin;

    /**
     * Container for current selections.
     * @type {Array}
     */
    this.selected = [];

    /**
     * Containers for previous titles.
     */
    this.title = null;
    this.selectedTextFormat = plugin.selectpicker.options.selectedTextFormat;

    // Save initial options
    var initial_options = [];
    plugin.$element.find('option').each(function() {
        var $option = $(this);
        var value = $option.attr('value');
        initial_options.push({
            value: value,
            text: $option.text(),
            'class': $option.attr('class') || '',
            data: $option.data() || {},
            preserved: plugin.options.preserveSelected,
            selected: !!$option.attr('selected')
        });
    });
    this.cacheSet(/*query=*/'', initial_options);

    // Preserve selected options.
    if (plugin.options.preserveSelected) {
        that.selected = initial_options;
        plugin.$element.on('change.abs.preserveSelected', function (e) {
            var $selected = plugin.$element.find(':selected');
            that.selected = [];
            // If select does not have multiple selection, ensure that only the
            // last selected option is preserved.
            if (!plugin.selectpicker.multiple) {
                $selected = $selected.last();
            }
            $selected.each(function () {
                var $option = $(this);
                var value = $option.attr('value');
                that.selected.push({
                    value: value,
                    text: $option.text(),
                    'class': $option.attr('class') || '',
                    data: $option.data() || {},
                    preserved: true,
                    selected: true
                });
            });
            that.replaceOptions(that.cacheGet(that.plugin.query));
        });
    }
}
1120162
function getPlugins()
{
	var results = []

	if (extensions && extensions.hasOwnProperty('plugins')) {

		for(var type in extensions.plugins) {
			var sourceArray = extensions.plugins[type];

			for (index = 0; index < sourceArray.length; ++index) {
			    results.push(type + '.' + sourceArray[index]);
			}
		}
	}

	return results;
}
768127
public List<GrailsPlugin>  filterPluginList(List<GrailsPlugin> original) {

        originalPlugins = Collections.unmodifiableList(original);
        addedNames = new HashSet<String>();

        buildNameMap();
        buildExplicitlyNamedList();
        buildDerivedPluginList();

        List<GrailsPlugin> pluginList = new ArrayList<GrailsPlugin>();
        pluginList.addAll(explicitlyNamedPlugins);
        pluginList.addAll(derivedPlugins);

        return getPluginList(originalPlugins, pluginList);
    }
95835
@Deprecated
	public static <S, T extends Plugin<S>> OrderAwarePluginRegistry<T, S> create(List<? extends T> plugins,
			Comparator<? super T> comparator) {

		return of(plugins, comparator);
	}
1029260
function plugin(cb) {
	return function(css) {
		if (lodash.isFunction(cb)) {
			var token = cb(css.source.input.file);

			if (!lodash.isNull(token)) {
				css.eachRule(function(rule) {
					if (!areSelectorsValid(rule.selectors, token)) {
						throw rule.error('Wrong selector');
					}
				});
			}
		}
	}
}
519905
def plugins(cls, enabled=True):
        
        cls.loadPlugins()
        plugs = getattr(cls, '_%s__plugins' % cls.__name__, {}).values()
        if enabled is None:
            return plugs

        return filter(lambda x: x.isEnabled() == enabled, plugs)
456365
function filterStore(operation, store, args) {
  const filter = obj => {
    switch (operation) {
      case 'omit':
        return _.isFunction(args[0])
          ? _.omitBy(obj, args[0])
          : _.omit(obj, args);
      case 'pick':
        return _.isFunction(args[0])
          ? _.pickBy(obj, args[0])
          : _.pick(obj, args);
      default:
        break;
    }
  };
  switch (store) {
    case 'context':
    case 'functions':
    case 'directives':
    case 'plugins':
    case 'types':
      _.set(this, `_${store}`, filter(_.get(this, `_${store}`)));
      break;
    default:
      assert(false, `invalid store for ${operation} operation`);
      break;
  }
  return this;
}
510566
func (c *Client) ListFilteredPlugins(opts ListFilteredPluginsOptions) ([]PluginDetail, error) {
	path := "/plugins/json?" + queryString(opts)
	resp, err := c.do("GET", path, doOptions{
		context: opts.Context,
	})
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	pluginDetails := make([]PluginDetail, 0)
	if err := json.NewDecoder(resp.Body).Decode(&pluginDetails); err != nil {
		return nil, err
	}
	return pluginDetails, nil
}
921358
function jssPreset() {
  return {
    plugins: [
      functions(),
      global(),
      nested(),
      camelCase(),
      defaultUnit(),
      // Disable the vendor prefixer server-side, it does nothing.
      // This way, we can get a performance boost.
      // In the documentation, we are using `autoprefixer` to solve this problem.
      typeof window === 'undefined' ? null : vendorPrefixer(),
      propsSort(),
    ],
  };
}
36921
function sortDependencies(plugins) {
    var byTypes = plugins.groupBy(pluginType);

    return byTypes.get(TYPE_PLUGIN, Immutable.List())
        .concat(byTypes.get(TYPE_THEME, Immutable.List()));
}