fcash-insight
Version:
A bitcoin block explorer and API.
29 lines (21 loc) • 579 B
text/typescript
import { Injectable } from '@angular/core';
import { Storage } from '@ionic/storage';
export class StorageService {
private storage: Storage;
constructor() {
this.storage = StorageService.initStorage();
}
public static initStorage(): Storage {
return new Storage({});
}
public get(key: string): Promise<{}> {
return this.storage.get(key);
}
public set(key: string, value: string): Promise<{}> {
return this.storage.set(key, value);
}
public remove(key: string): Promise<{}> {
return this.storage.remove(key);
}
}