This commit is contained in:
14
node_modules/localforage/src/utils/isLocalStorageValid.js
generated
vendored
Normal file
14
node_modules/localforage/src/utils/isLocalStorageValid.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
function isLocalStorageValid() {
|
||||
try {
|
||||
return (
|
||||
typeof localStorage !== 'undefined' &&
|
||||
'setItem' in localStorage &&
|
||||
// in IE8 typeof localStorage.setItem === 'object'
|
||||
!!localStorage.setItem
|
||||
);
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
export default isLocalStorageValid;
|
||||
Reference in New Issue
Block a user