From 363492aef5aee34190d14914ae808f89a1e1c87a Mon Sep 17 00:00:00 2001 From: Killer Boss Original <73131550+killerbossoriginal@users.noreply.github.com> Date: Wed, 12 Apr 2023 18:29:31 +0200 Subject: [PATCH] test --- src/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 037d291..50ae587 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,6 +5,8 @@ const writeDB = promisify(fs.writeFile); class MitDB { readonly db; + fn: string; + options?: any; /** * @constructor @@ -37,7 +39,7 @@ class MitDB { const data: any[] = JSON.parse(file.toString()); const i = data.findIndex((pair: any) => pair.key == key); - + !data[i] ? data.push({ key, value }) : data[i] = { key, value }; await writeDB(this.db, JSON.stringify(data));