Some more small code improvements
This commit is contained in:
@@ -110,12 +110,10 @@ function addSignatureTypes(f) {
|
||||
|
||||
function shortenPaths(files, commonPrefix) {
|
||||
// always use forward slashes
|
||||
const regexp = new RegExp('\\\\', 'g');
|
||||
|
||||
Object.keys(files).forEach(function (file) {
|
||||
files[file].shortened = files[file].resolved
|
||||
.replace(commonPrefix, '')
|
||||
.replace(regexp, '/');
|
||||
.replaceAll('\\', '/');
|
||||
});
|
||||
|
||||
return files;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user