mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-11-08 23:25:51 +01:00
search now accepts a tilda to list all contents of the local package list
This commit is contained in:
parent
8c2329795d
commit
71d5e5f150
@ -12,7 +12,9 @@ function Search() {
|
||||
}
|
||||
|
||||
Search.prototype.query = function(q) {
|
||||
return this.index.search(q)
|
||||
return q === '~'
|
||||
? this.storage.config.localList.get().map( function( package ){ return { ref: package, score: 1 }; } )
|
||||
: this.index.search(q);
|
||||
}
|
||||
|
||||
Search.prototype.add = function(package) {
|
||||
@ -45,4 +47,3 @@ Search.prototype.configureStorage = function(storage) {
|
||||
}
|
||||
|
||||
module.exports = Search()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user