Skip to content

Commit

Permalink
Added keys to storage
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanBluefox committed Oct 24, 2023
1 parent dc41766 commit 710c2af
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 16 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
- ble

## Changelog
### 0.1.0 (2023-10-24)
### **WORK IN PROGRESS**
* (bluefox) Devices were implemented

### 0.0.5 (2023-10-24)
Expand Down
13 changes: 0 additions & 13 deletions io-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,6 @@
"name": "matter",
"version": "0.1.0",
"news": {
"0.1.0": {
"en": "Devices were implemented",
"de": "Geräte wurden implementiert",
"ru": "Были реализованы устройства",
"pt": "Dispositivos foram implementados",
"nl": "De slachtoffers werden uitgevoerd",
"fr": "Des dispositifs ont été mis en œuvre",
"it": "I dispositivi sono stati implementati",
"es": "Se aplicaron dispositivos",
"pl": "Zbiór został zaimplementowany",
"uk": "Пристрої реалізовані",
"zh-cn": "被处决者"
},
"0.0.5": {
"en": "Fixed names under linux",
"de": "Feste Namen unter Linux",
Expand Down
7 changes: 5 additions & 2 deletions src/matter/StorageIoBroker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,12 @@ export class StorageIoBroker implements Storage {
}

keys(contexts: string[]): string[] {
const oid = StorageIoBroker.buildKey(contexts, '');
const contextKeyStart = StorageIoBroker.buildKey(contexts, '');
const len = contextKeyStart.length;

return Object.keys(this.data).filter(key => key.startsWith(oid)).map(key => key.substring(oid.length));
return Object.keys(this.data)
.filter(key => key.startsWith(contextKeyStart) && key.indexOf('$$', len) === -1)
.map(key => key.substring(len));
}

saveKey(oid: string, value: string): void {
Expand Down

0 comments on commit 710c2af

Please sign in to comment.