A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
feat: add db.debug for debug related functions
thecodrrc77bdcd3ce15
diff --git a/packages/core/api/debug.js b/packages/core/api/debug.jsnew file mode 100644index 000000000..03b4b737a--- /dev/null+++ b/packages/core/api/debug.js@@ -0,0 +1,14 @@+export default class Debug {+ strip(item) {+ return JSON.stringify({+ type: item.type,+ notebooks: item.notebooks,+ tags: item.tags,+ id: item.id,+ contentId: item.contentId,+ dateEdited: item.dateEdited,+ dateDeleted: item.dateDeleted,+ dateCreated: item.dateCreated,+ });+ }+}diff --git a/packages/core/api/index.js b/packages/core/api/index.jsindex 1b435d258..0e3894609 100644--- a/packages/core/api/index.js+++ b/packages/core/api/index.js@@ -19,6 +19,7 @@ import UserManager from "./user-manager";import http from "../utils/http";import Monographs from "./monographs";import Offers from "./offers";+import Debug from "./debug";/*** @type {EventSource}@@ -74,6 +75,7 @@ class Database {this.outbox = new Outbox(this);this.monographs = new Monographs(this);this.offers = new Offers();+ this.debug = new Debug();// collections/** @type {Notes} */