Skip to content

Commit

Permalink
Updating app files
Browse files Browse the repository at this point in the history
  • Loading branch information
tarsislimadev committed Dec 16, 2024
1 parent 2eff7e7 commit 0f6163c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/database.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ class Database {
return this.list().find((data) => data.id == id)
}

toString() {
return JSON.stringify(this.listJSON())
}

}

module.exports = {
Expand Down
4 changes: 4 additions & 0 deletions src/object.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ class DatabaseObject {
return this.getProps()
.reduce((json = {}, prop) => ({ ...json, [prop]: this.readString(prop) }), {})
}

toString() {
return JSON.stringify(this.toJSON())
}
}

module.exports = {
Expand Down

0 comments on commit 0f6163c

Please sign in to comment.