Skip to content

Commit bd0c1a3

Browse files
committed
1 parent fbcb2bb commit bd0c1a3

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

examples/io/storage/webstorage/webstorage.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2025 Moddable Tech, Inc.
2+
* Copyright (c) 20252-2026 Moddable Tech, Inc.
33
*
44
* This file is part of the Moddable SDK Runtime.
55
*
@@ -56,6 +56,10 @@
5656
this.#kvp.write(key, value);
5757
}
5858
remove(key) {
59+
trace("localStorage.remove() deprecated. Use localStorage.removeItem() instead\n");
60+
return this.removeItem(key);
61+
}
62+
removeItem(key) {
5963
this.#kvp.delete(key);
6064
}
6165
clear() {

typings/web/webstorage.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ declare module "webstorage" {
2525
key(index: number): string | null;
2626
getItem(key: string): string | null;
2727
setItem(key: string, value: string): void;
28-
remove(key: string): void;
28+
removeItem(key: string): void;
2929
clear(): void;
3030
}
3131

0 commit comments

Comments
 (0)