mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-12 05:48:57 +00:00
17 lines
331 B
JavaScript
17 lines
331 B
JavaScript
|
|
/**
|
|
* 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;
|