2020-10-30 20:34:04 +00:00
|
|
|
// Copyright 2019-2020 Signal Messenger, LLC
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2020-09-16 19:31:05 +00:00
|
|
|
// Matching window.storage.put API
|
|
|
|
// eslint-disable-next-line max-len
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
|
|
export function put(key: string, value: any): void {
|
2020-03-31 20:03:38 +00:00
|
|
|
window.storage.put(key, value);
|
2019-05-16 22:32:11 +00:00
|
|
|
}
|
|
|
|
|
2020-09-16 19:31:05 +00:00
|
|
|
export async function remove(key: string): Promise<void> {
|
2020-07-24 23:32:08 +00:00
|
|
|
await window.storage.remove(key);
|
2019-05-16 22:32:11 +00:00
|
|
|
}
|