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

Function initStorage

core_js/storage.js:192–200  ·  view source on GitHub ↗

* Set default values, if the storage is empty. * @param {Object} items

(items)

Source from the content-addressed store, hash-verified

190 * @param {Object} items
191 */
192function initStorage(items) {
193 initSettings();
194
195 if (!isEmpty(items)) {
196 Object.entries(items).forEach(([key, value]) => {
197 setData(key, value);
198 });
199 }
200}
201
202/**
203 * Set default values for the settings.

Callers 1

genesisFunction · 0.85

Calls 5

initSettingsFunction · 0.85
isEmptyFunction · 0.85
setDataFunction · 0.85
forEachMethod · 0.80
entriesMethod · 0.80

Tested by

no test coverage detected