dyno-bot/Dyno-mobile-dev (1)/Dyno-mobile-dev/db.js

20 lines
360 B
JavaScript
Raw Permalink Normal View History

2020-09-12 20:08:48 +02:00
import { AsyncStorage } from 'react-native';
export class LocalStorage {
constructor() {
this.local = AsyncStorage;
}
async set(key, value) {
return this.local.setItem(key, value);
}
async get(key) {
return this.local.getItem(key);
}
async delete(key) {
return this.local.removeItem(key);
}
}