mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 20:49:20 +03:00
eslint (additional rules)
This commit is contained in:
parent
77a1d3f3df
commit
8e8a041032
150 changed files with 21911 additions and 23106 deletions
|
|
@ -8,14 +8,13 @@ class CookieDriver
|
|||
/**
|
||||
* @param {string} key
|
||||
* @param {*} data
|
||||
* @return {boolean}
|
||||
* @returns {boolean}
|
||||
*/
|
||||
set(key, data) {
|
||||
|
||||
let
|
||||
result = false,
|
||||
storageResult = null
|
||||
;
|
||||
storageResult = null;
|
||||
|
||||
try
|
||||
{
|
||||
|
|
@ -41,7 +40,7 @@ class CookieDriver
|
|||
|
||||
/**
|
||||
* @param {string} key
|
||||
* @return {*}
|
||||
* @returns {*}
|
||||
*/
|
||||
get(key) {
|
||||
|
||||
|
|
@ -51,8 +50,7 @@ class CookieDriver
|
|||
{
|
||||
const
|
||||
storageValue = $.cookie(CLIENT_SIDE_STORAGE_INDEX_NAME),
|
||||
storageResult = null === storageValue ? null : JSON.parse(storageValue)
|
||||
;
|
||||
storageResult = null === storageValue ? null : JSON.parse(storageValue);
|
||||
|
||||
result = (storageResult && !isUnd(storageResult[key])) ? storageResult[key] : null;
|
||||
}
|
||||
|
|
@ -62,7 +60,7 @@ class CookieDriver
|
|||
}
|
||||
|
||||
/**
|
||||
* @return {boolean}
|
||||
* @returns {boolean}
|
||||
*/
|
||||
static supported() {
|
||||
return !!(window.navigator && window.navigator.cookieEnabled);
|
||||
|
|
|
|||
|
|
@ -8,14 +8,13 @@ class LocalStorageDriver
|
|||
/**
|
||||
* @param {string} key
|
||||
* @param {*} data
|
||||
* @return {boolean}
|
||||
* @returns {boolean}
|
||||
*/
|
||||
set(key, data) {
|
||||
|
||||
let
|
||||
result = false,
|
||||
storageResult = null
|
||||
;
|
||||
storageResult = null;
|
||||
|
||||
try
|
||||
{
|
||||
|
|
@ -38,7 +37,7 @@ class LocalStorageDriver
|
|||
|
||||
/**
|
||||
* @param {string} key
|
||||
* @return {*}
|
||||
* @returns {*}
|
||||
*/
|
||||
get(key) {
|
||||
|
||||
|
|
@ -48,8 +47,7 @@ class LocalStorageDriver
|
|||
{
|
||||
const
|
||||
storageValue = window.localStorage[CLIENT_SIDE_STORAGE_INDEX_NAME] || null,
|
||||
storageResult = null === storageValue ? null : JSON.parse(storageValue)
|
||||
;
|
||||
storageResult = null === storageValue ? null : JSON.parse(storageValue);
|
||||
|
||||
result = (storageResult && !isUnd(storageResult[key])) ? storageResult[key] : null;
|
||||
}
|
||||
|
|
@ -59,7 +57,7 @@ class LocalStorageDriver
|
|||
}
|
||||
|
||||
/**
|
||||
* @return {boolean}
|
||||
* @returns {boolean}
|
||||
*/
|
||||
static supported() {
|
||||
return !!window.localStorage;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue