diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-06-10 16:44:13 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-06-10 16:44:13 +0200 |
commit | 94d4234cb8523d080cfba87b4a51e3ebcffc4159 (patch) | |
tree | d5a12b3ec07dd4f0a89b27ee4071cbb8415b9643 /lib/plugins/toNames.js | |
parent | b9fe60915f8555fb339a8e736a0b1fa604738364 (diff) | |
parent | fbc851bc4e21e30490fea508758856dab3f22037 (diff) | |
download | gitbook-94d4234cb8523d080cfba87b4a51e3ebcffc4159.zip gitbook-94d4234cb8523d080cfba87b4a51e3ebcffc4159.tar.gz gitbook-94d4234cb8523d080cfba87b4a51e3ebcffc4159.tar.bz2 |
Merge branch 'fix/plugins_order'
Diffstat (limited to 'lib/plugins/toNames.js')
-rw-r--r-- | lib/plugins/toNames.js | 16 |
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; |