dragonroll/backend/node_modules/@aws-sdk/credential-provider-cognito-identity/dist-es/InMemoryStorage.js

18 lines
347 B
JavaScript
Raw Normal View History

2024-09-21 17:08:36 +00:00
export class InMemoryStorage {
constructor(store = {}) {
this.store = store;
}
getItem(key) {
if (key in this.store) {
return this.store[key];
}
return null;
}
removeItem(key) {
delete this.store[key];
}
setItem(key, value) {
this.store[key] = value;
}
}