MCPcopy Create free account
hub / github.com/microsoft/SandDance / getStorage

Function getStorage

docs/tests/v2/es6/js/sanddance.js:1160–1170  ·  view source on GitHub ↗
(type)

Source from the content-addressed store, hash-verified

1158function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1159
1160function getStorage(type) {
1161 try {
1162 var storage = window[type];
1163 var x = '__storage_test__';
1164 storage.setItem(x, x);
1165 storage.removeItem(x);
1166 return storage;
1167 } catch (e) {
1168 return null;
1169 }
1170}
1171
1172var LocalStorage = function () {
1173 function LocalStorage(id, defaultSettings) {

Callers 1

LocalStorageFunction · 0.70

Calls 1

removeItemMethod · 0.80

Tested by

no test coverage detected