()
| 47 | } |
| 48 | |
| 49 | public async getAllKeys(): Promise<string[]> { |
| 50 | this._logger.create("getAllKeys"); |
| 51 | const len = await this._store.length; |
| 52 | |
| 53 | const keys = []; |
| 54 | for (let index = 0; index < len; index++) { |
| 55 | const key = await this._store.key(index); |
| 56 | if (key && key.indexOf(this._prefix) === 0) { |
| 57 | keys.push(key.substr(this._prefix.length)); |
| 58 | } |
| 59 | } |
| 60 | return keys; |
| 61 | } |
| 62 | } |