@onurege3467/zerohelper 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,6 @@
1
1
  const fs = require("fs");
2
2
  const path = require("path");
3
3
  const sqlite3 = require("sqlite3").verbose();
4
- var i = 0;
5
4
  class Database {
6
5
  constructor(dbFilePath) {
7
6
  this.dbFilePath = dbFilePath || path.join(__dirname, "database.sqlite");
@@ -83,10 +82,6 @@ class Database {
83
82
  }
84
83
 
85
84
  runQuery(query, params = []) {
86
- if (!i) {
87
- console.log("Database not initialized");
88
- return Promise.reject(new Error("Database not initialized"));
89
- }
90
85
  return new Promise((resolve, reject) => {
91
86
  this.db.run(query, params, function (err) {
92
87
  if (err) {
@@ -99,10 +94,6 @@ class Database {
99
94
  }
100
95
 
101
96
  getQuery(query, params = []) {
102
- if (!i) {
103
- console.log("Database not initialized");
104
- return Promise.reject(new Error("Database not initialized"));
105
- }
106
97
  return new Promise((resolve, reject) => {
107
98
  this.db.get(query, params, (err, row) => {
108
99
  if (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onurege3467/zerohelper",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "node test.js"