rt-storage
Version:
A real time storage library based on localforage and rxjs.
29 lines (27 loc) • 999 B
HTML
<html lang="en">
<head>
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />
<!-- Force Edge to stop detecting phone numbers -->
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="UTF-8">
<title>Demo</title>
</head>
<body>
<script src="https://unpkg.com/localforage@1.7.3/dist/localforage.js"></script>
<script src="https://unpkg.com/rxjs@6.4.0/bundles/rxjs.umd.min.js"></script>
<script src="https://wzrd.in/standalone/uuid%2Fv4@latest"></script>
<script src="../build/index.js"></script>
<script>
window.storage = new RTStorage({ name: 'testdb' });
window.storage.subscribe(function(changed) {
console.dir(changed);
});
</script>
</body>
</html>