Skip to content

Commit

Permalink
list by prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
bahalool committed Jan 29, 2019
1 parent 32cad93 commit 047e0bc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ class RedisAdapter {
});
}

async listPrefixes(options) {
const res = await this.list(options);
return res.map(r => r.path.match(options.path + '/(.*)/')[1]);
}

async delete(options) {
let { path } = options;
if (!path.startsWith('/')) {
Expand Down

0 comments on commit 047e0bc

Please sign in to comment.