Showing 4 of 14 total issues
BetterStorage
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
Open
@autobind
export default class BetterStorage {
constructor(prefix = '', kind = 'local', overrides = {}) {
this.prefix = prefix;
this.kind = kind;
BetterStorageAsync
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
Open
@autobind
export default class BetterStorageAsync {
constructor(prefix = '', kind = 'local', overrides = {}) {
this.prefix = prefix;
this.kind = kind;
Function setKind
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setKind(kind, migrateData = false) {
return new Promise((accept, reject) => {
const newStore = typeof kind === 'string' ? window[`${kind}Storage`] : kind;
if (migrateData && this.prefix !== '' && this.keys.length > 0) {
this.keys
Function setPrefix
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setPrefix(prefix = '', changeExisting = false) {
return new Promise((accept, reject) => {
if (changeExisting && this.prefix !== '' && this.keys.length > 0) {
this.keys
.then((keys) => {