delete
The delete
method can remove the data of a specified key.
async function delete(key: string): Promise<void>;
Reference
Overview
You can remove the data of an object with a specified key by calling the delete
method.
import { myStorage } from "#elements";
...
await myStorage.delete("my-data/string.txt");
...
Parameters
key
: A string that uniquely identifies the object. This string should start and end with letters or numbers, and the middle can contain letters, numbers, dots, slashes, hyphens, or underscores.
Returns
The delete
method does not return any value.
Caveats
- The deleted data will not be retained, operate with caution.