Some more small code improvements

This commit is contained in:
Maximilian Krög
2022-08-09 00:10:06 +02:00
parent 5b8d810f80
commit 5fb69b1de1
4 changed files with 5 additions and 15 deletions
+1 -5
View File
@@ -14,11 +14,7 @@ const path = require('path');
*/
exports.publish = function (data, opts) {
function getTypes(data) {
const types = [];
data.forEach(function (name) {
types.push(name.replace(/^function$/, 'Function'));
});
return types;
return data.map((name) => name.replace(/^function$/, 'Function'));
}
// get all doclets that have exports