static create({type, ...rest}) {
        if (!type) {
            if (rest.prefKey) type = 'pref';
            if (rest.localStorageKey) type = 'localStorage';
            if (rest.dashViewModel) type = 'dashView';
            if (rest.getData || rest.setData) type = 'custom';
        }

        switch (type) {
            case 'pref':
                return new PrefProvider(rest);
            case 'localStorage':
                return new LocalStorageProvider(rest);
            case `dashView`:
                return new DashViewProvider(rest);
            case 'custom':
                return new CustomProvider(rest);
            default:
                throw XH.exception(`Unknown Persistence Provider for type: ${type}`);
        }
    }
/**
     * Construct an instance of this class.
     *
     * @param {PersistOptions} spec
     * @return {PersistenceProvider}
     */
Construct an instance of this class.
Construct an instance of this class .
static create({type, ...rest}) {
        if (!type) {
            if (rest.prefKey) type = 'pref';
            if (rest.localStorageKey) type = 'localStorage';
            if (rest.dashViewModel) type = 'dashView';
            if (rest.getData || rest.setData) type = 'custom';
        }
        switch (type) {
            case 'pref':
                return new PrefProvider(rest);
            case 'localStorage':
                return new LocalStorageProvider(rest);
            case `dashView`:
                return new DashViewProvider(rest);
            case 'custom':
                return new CustomProvider(rest);
            default:
                throw XH.exception(`Unknown Persistence Provider for type: ${type}`);
        }
    }
static create ( { type , ... rest } ) { if ( ! type ) { if ( rest . prefKey ) type = 'pref' ; if ( rest . localStorageKey ) type = 'localStorage' ; if ( rest . dashViewModel ) type = 'dashView' ; if ( rest . getData || rest . setData ) type = 'custom' ; } switch ( type ) { case 'pref' : return new PrefProvider ( rest ) ; case 'localStorage' : return new LocalStorageProvider ( rest ) ; case ` ` : return new DashViewProvider ( rest ) ; case 'custom' : return new CustomProvider ( rest ) ; default : throw XH . exception ( ` ${ type } ` ) ; } }
Construct an instance of this class.
Construct an instance of this class .