summaryrefslogtreecommitdiffstats
path: root/lib/plugins/toNames.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/plugins/toNames.js')
-rw-r--r--lib/plugins/toNames.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/plugins/toNames.js b/lib/plugins/toNames.js
new file mode 100644
index 0000000..ad0dd8f
--- /dev/null
+++ b/lib/plugins/toNames.js
@@ -0,0 +1,16 @@
+
+/**
+ * Return list of plugin names. This method is nly used in unit tests.
+ *
+ * @param {OrderedMap<String:Plugin} plugins
+ * @return {Array<String>}
+ */
+function toNames(plugins) {
+ return plugins
+ .map(function(plugin) {
+ return plugin.getName();
+ })
+ .toArray();
+}
+
+module.exports = toNames;