MCPcopy Index your code
hub / github.com/ClearURLs/Addon / storageDataAsString

Function storageDataAsString

core_js/storage.js:52–64  ·  view source on GitHub ↗

* Converts a given storage data to its string representation. * @param key key of the storage data * @returns {string} string representation

(key)

Source from the content-addressed store, hash-verified

50 * @returns {string} string representation
51 */
52function storageDataAsString(key) {
53 let value = storage[key];
54
55 switch (key) {
56 case "ClearURLsData":
57 case "log":
58 return JSON.stringify(value);
59 case "types":
60 return value.toString();
61 default:
62 return value;
63 }
64}
65
66/**
67 * Delete key from browser storage.

Callers 2

storageAsJSONFunction · 0.85
saveOnDiskFunction · 0.85

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected