MCPcopy
hub / github.com/ampproject/amphtml / remove

Method remove

third_party/subscriptions-project/swg.js:18786–18801  ·  view source on GitHub ↗

* @param {string} key * @param {boolean=} useLocalStorage * @return {!Promise}

(key, useLocalStorage = false)

Source from the content-addressed store, hash-verified

18784 * @return {!Promise}
18785 */
18786 remove(key, useLocalStorage = false) {
18787 delete this.values_[key];
18788 return new Promise((resolve) => {
18789 const storage = useLocalStorage
18790 ? this.win_.localStorage
18791 : this.win_.sessionStorage;
18792 if (storage) {
18793 try {
18794 storage.removeItem(storageKey(key));
18795 } catch (e) {
18796 // Ignore error.
18797 }
18798 }
18799 resolve();
18800 });
18801 }
18802}
18803
18804/**

Callers 15

wFunction · 0.45
DFunction · 0.45
JFunction · 0.45
jeFunction · 0.45
BeFunction · 0.45
d3.jsFile · 0.45
nFunction · 0.45
disableMaskingUntilClearFunction · 0.45
factoryFunction · 0.45
uFunction · 0.45
factoryFunction · 0.45
closeMethod · 0.45

Calls 3

storageKeyFunction · 0.85
removeItemMethod · 0.80
resolveFunction · 0.50

Tested by

no test coverage detected