Skip to content

Conversation

@RobinCK
Copy link
Owner

@RobinCK RobinCK commented Mar 1, 2018

No description provided.

src/index.js Outdated
try {
store = typeof window !== 'undefined' && v in window ? window[v] : undefined;
} catch (e) { console.log(v + ' error: ' + e) }
})

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

src/index.js Outdated
if (store) return;
try {
store = typeof window !== 'undefined' && v in window ? window[v] : undefined;
} catch (e) { console.log(v + ' error: ' + e) }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

src/index.js Outdated
? window.localStorage
: Memory;
let store;
['localStorage', 'sessionStorage'].forEach( v => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').

src/index.js Outdated
const store = typeof window !== 'undefined' && 'localStorage' in window
? window.localStorage
: Memory;
let store;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'let' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

@coveralls
Copy link

coveralls commented Mar 1, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling 4bd0a01 on develop into 821955d on master.

src/index.js Outdated
try {
store = typeof window !== 'undefined' && v in window ? window[v] : undefined;
} catch (e) {
console.log(`${v} Error ${e.toString()}`); // eslint-disable-line

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'template literal syntax' is only available in ES6 (use 'esversion: 6').

src/index.js Outdated
break;

case 'session': store = typeof window !== 'undefined' && 'sessionStorage' in window
? window.sessionStorage

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Misleading line break before '?'; readers may interpret this as an expression boundary.

src/index.js Outdated

switch(_options.storage) { // eslint-disable-line
case 'local': store = typeof window !== 'undefined' && 'localStorage' in window
? window.localStorage

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Misleading line break before '?'; readers may interpret this as an expression boundary.


case 'session':
store = typeof window !== 'undefined' && 'sessionStorage' in window
? window.sessionStorage

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Misleading line break before '?'; readers may interpret this as an expression boundary.

switch(_options.storage) { // eslint-disable-line
case 'local':
store = typeof window !== 'undefined' && 'localStorage' in window
? window.localStorage

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Misleading line break before '?'; readers may interpret this as an expression boundary.

@RobinCK RobinCK merged commit 7827622 into master Mar 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants