-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathweb.html
More file actions
60 lines (52 loc) · 1.41 KB
/
web.html
File metadata and controls
60 lines (52 loc) · 1.41 KB
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
<!doctype html>
<html>
<head>
<script src="https://unpkg.com/lodash@4/lodash.min.js"></script>
<script src="https://unpkg.com/lowdb@0.17/dist/low.min.js"></script>
<script src="https://unpkg.com/lowdb@0.17/dist/LocalStorage.min.js"></script>
<script>
var adapter = new LocalStorage('db')
var db = low(adapter)
db.defaults({
topic: [],
author: []
}).write();
// db.get('author').push({
// id:1,
// name:'egoing',
// profile:'developer'
// }).write();
// db.get('topic').push({
// id:1,
// title:'lowdb',
// description:'lowdb is ...',
// author:1
// }).write();
// db.get('topic').push({
// id: 2,
// title: 'mysql',
// description: 'mysql is ...',
// author: 1
// }).write();
// console.log(
// db.get('topic')
// .find({
// title: 'lowdb',
// author: 1
// })
// .value()
// );
// db.get('topic')
// .find({
// id: 2
// })
// .assign({
// title: 'MySQL & MariaDB'
// })
// .write();
db.get('topic')
.remove({id:2})
.write();
</script>
</head>
</html>