clearStorage

Static clearStorage 

Source
pub static clearStorage: ClearStorageInternalType
Expand description

Clears all local storage items set with storeItem() for the current domain.

Examples

 function setup() {
   let myNum = 10;
   let myBool = false;
   storeItem('myNum', myNum);
   storeItem('myBool', myBool);
   print(getItem('myNum')); // logs 10 to the console
   print(getItem('myBool')); // logs false to the console
   clearStorage();
   print(getItem('myNum')); // logs null to the console
   print(getItem('myBool')); // logs null to the console
 }