How to use the @ionic/storage.Storage function in @ionic/storage

To help you get started, we’ve selected a few @ionic/storage examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github natural-apptitude / ngrx-store-ionic-storage / src / index.ts View on Github external
import { Injectable } from '@angular/core';
import { Storage } from '@ionic/storage';
import { Effect } from '@ngrx/effects';
import { ActionReducer } from '@ngrx/store';
import { defer, from, Observable, of } from 'rxjs';
import { catchError, map } from 'rxjs/operators';

const STORAGE_KEY = 'NSIS_APP_STATE';

const storage = new Storage({});

// get/setNested inspired by
// https://github.com/mickhansen/dottie.js
function getNested(obj: any, path: string): any {
  if (obj !== null && path) {
    // Recurse into the object.
    const parts = path.split('.').reverse();
    while (obj != null && parts.length) {
      obj = obj[parts.pop()];
    }
  }
  return obj;
}

function setNested(obj: any, path: string, value: any): any {
  if (obj != null && path) {
github shprink / ionic-angular-twitter-pwa / src / app / app.module.ts View on Github external
export function provideStorage() {
  return new Storage({ name: '__twitter-pwa' });
}
github bitpay / bitcore / packages / insight / app / src / services / storageService.ts View on Github external
public static initStorage(): Storage {
    return new Storage({});
  }
github wordpress-clients / hybrid / dist / config / index.ts View on Github external
export function provideStorage() {
    return new Storage({ name: '__wphc' });
}
github Ovilia / 2019-typography-calendar / src / services / storage.ts View on Github external
constructor() {
        this.nativeStorage = new NativeStorage();
        this.localStorage = new LocalStorage({});
    }

@ionic/storage

Ionic Storage Helper

MIT
Latest version published 2 years ago

Package Health Score

59 / 100
Full package analysis