Skip to content

Commit 17b6cf0

Browse files
committed
feat(ConfigInterface): add previousPrefix field
1 parent faeb2a9 commit 17b6cf0

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/config/config.interface.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
export interface WebStorageConfigInterface {
22
prefix?: string;
3+
previousPrefix?: string;
34
clearType?: ClearType;
45
mutateObjects?: boolean;
56
}

src/utility/webstorage-utility.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class WebStorageUtility {
1515
}
1616
}
1717

18-
public constructor(storage: Storage, prefix: string) {
18+
public constructor(storage: Storage, prefix: string, previousPrefix?: string) {
1919
this._storage = storage;
2020
this._prefix = prefix;
2121
}
@@ -37,6 +37,7 @@ export class WebStorageUtility {
3737
return value;
3838
}
3939

40+
// TODO return true if item existed and false otherwise (?)
4041
public remove(key: string): void {
4142
let storageKey = this.getStorageKey(key);
4243
this._storage.removeItem(storageKey);

0 commit comments

Comments
 (0)