All files / src/storages localStorage.js

85.71% Statements 6/7
66.67% Branches 4/6
100% Functions 0/0
85.71% Lines 6/7
1 2 3 4 5 6 7 8 9 10 11 12 13 141x 1x 1x   1x   1x       1x      
import util from '../util';
import Shim from '../shim';
import Storage from '../storage';
 
const store = typeof window !== 'undefined' && 'localStorage' in window ? window.localStorage : Shim
 
Iif (false === util.checkSupportStorage(store)) {
  throw new Error('Local storage not supported by this browser');
}
 
const storageObject = new Storage(store);
 
export default storageObject;