This repository has been archived by the owner on Jul 16, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
65 lines (57 loc) · 1.37 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import Entity from './src/Entity/Entity';
import UnloadedValue from './src/Entity/UnloadedValue';
import * as Normalizer from './src/Utils/Normalizer';
import StorageManager from './src/Manager/StorageManager';
import Provider from './src/Component/Provider';
import { connect } from './src/Utils/Connect';
import { LinkedDataTransformer } from './src/Utils/Normalizer';
/**
*
* @param {Entity} entity
* @param {String} classname
*/
function registerEntity(entity, classname) {
Normalizer.EntityNormalizer.addEntity(entity, classname);
}
async function purgestorage() {
return await StorageManager.purgestorage();
}
/**
*
* @param {String} key
* @returns {*}
*/
function load(key = null) {
return StorageManager.load(key);
}
/**
*
* @param {String} key
* @param {*} value
*/
async function save(key, value = null) {
await StorageManager.save(key, value);
}
/**
*
* @param {String} key
* @param {*} value
*/
async function remove(key, value = null) {
await StorageManager.remove(key, value);
}
/**
*
* @param {String} key
*/
async function reset(key) {
await StorageManager.reset(key);
}
/**
*
* @param {String} key
*/
async function clear(key = null) {
await StorageManager.clear(key);
}
export { registerEntity, Entity, UnloadedValue, clear, purgestorage, reset, Provider, connect, LinkedDataTransformer, save, load, remove };