honkit
Version:
HonKit is building beautiful books using Markdown.
16 lines (15 loc) • 443 B
JavaScript
;
/**
* Test if a plugin is listed
* @param { {List<PluginDependency}} deps
* @param {string} plugin
* @param {string} version
* @return {boolean}
*/
Object.defineProperty(exports, "__esModule", { value: true });
function hasPlugin(deps, pluginName, version) {
return !!deps.find((dep) => {
return dep.getName() === pluginName && (!version || dep.getVersion() === version);
});
}
exports.default = hasPlugin;