Skip to content

Commit 0f6163c

Browse files
committed
Updating app files
1 parent 2eff7e7 commit 0f6163c

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/database.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ class Database {
6464
return this.list().find((data) => data.id == id)
6565
}
6666

67+
toString() {
68+
return JSON.stringify(this.listJSON())
69+
}
70+
6771
}
6872

6973
module.exports = {

src/object.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ class DatabaseObject {
6868
return this.getProps()
6969
.reduce((json = {}, prop) => ({ ...json, [prop]: this.readString(prop) }), {})
7070
}
71+
72+
toString() {
73+
return JSON.stringify(this.toJSON())
74+
}
7175
}
7276

7377
module.exports = {

0 commit comments

Comments
 (0)