fix: eslint issues and reconfiguring (#3891)
* fix: eslint fixes --------- Co-authored-by: gurusainath <gurusainath007@gmail.com>
This commit is contained in:
parent
921b9078f1
commit
3d09a69d58
790 changed files with 4155 additions and 4051 deletions
|
|
@ -3,15 +3,15 @@ import isEmpty from "lodash/isEmpty";
|
|||
export const storage = {
|
||||
set: (key: string, value: object | string | boolean): void => {
|
||||
if (typeof window === undefined || typeof window === "undefined" || !key || !value) return undefined;
|
||||
const _value: string | undefined = value
|
||||
const tempValue: string | undefined = value
|
||||
? ["string", "boolean"].includes(typeof value)
|
||||
? value.toString()
|
||||
: isEmpty(value)
|
||||
? undefined
|
||||
: JSON.stringify(value)
|
||||
? undefined
|
||||
: JSON.stringify(value)
|
||||
: undefined;
|
||||
if (!_value) return undefined;
|
||||
window.localStorage.setItem(key, _value);
|
||||
if (!tempValue) return undefined;
|
||||
window.localStorage.setItem(key, tempValue);
|
||||
},
|
||||
|
||||
get: (key: string): string | undefined => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue