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 061266a commit dc41766
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
},
"dependencies": {
"@iobroker/adapter-core": "^3.0.4",
"@project-chip/matter.js": "dev",
"@project-chip/matter-node.js": "^0.6.0",
"@project-chip/matter.js": "0.6.1-alpha.0-20231022-4bd17ea",
"@project-chip/matter-node.js": "0.6.1-alpha.0-20231022-4bd17ea",
"@iobroker/type-detector": "^3.0.5",
"axios": "^1.5.1",
"jsonwebtoken": "^9.0.2"
Expand Down
6 changes: 6 additions & 0 deletions src/matter/StorageIoBroker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ export class StorageIoBroker implements Storage {
return value as T;
}

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

return Object.keys(this.data).filter(key => key.startsWith(oid)).map(key => key.substring(oid.length));
}

saveKey(oid: string, value: string): void {
const index = this.savingNumber++;
if (this.savingNumber >= 0xFFFFFFFF) {
Expand Down

0 comments on commit dc41766

Please sign in to comment.