0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-02-17 23:45:29 -05:00

Sort packages before rendering in UI

This commit is contained in:
Alexander Makarenko 2015-09-24 11:24:23 +03:00
parent 6b3617754c
commit 4379821787

View file

@ -55,6 +55,15 @@ module.exports = function(config, auth, storage) {
})
})
}, function(packages) {
packages.sort(function(p1, p2) {
if (p1.name < p2.name) {
return -1;
}
else {
return 1;
}
});
next(template({
name: config.web && config.web.title ? config.web.title : 'Sinopia',
packages: packages,