summaryrefslogtreecommitdiffstats
path: root/lib/modifiers/config/isDefaultPlugin.js
blob: e68874a560979ea8b35f9b1989a39e196b1c129f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
var DEFAULT_PLUGINS = require('../../constants/defaultPlugins');

/**
 * Test if a plugin is a default one
 * @param {String} plugin
 * @param {String} version
 * @return {Boolean}
 */
function isDefaultPlugin(pluginName, version) {
    return !!DEFAULT_PLUGINS.find(function(dep) {
        return dep.getName() === pluginName && (!version || dep.getVersion() === version);
    });
}

module.exports = isDefaultPlugin;