node-json-database
Advanced tools
Comparing version 0.0.21 to 0.0.22
@@ -439,2 +439,3 @@ "use strict"; | ||
}; | ||
// Returns thisDb | ||
var thisDb = { | ||
@@ -466,2 +467,9 @@ create: function () { | ||
}, | ||
getTables: function () { | ||
var tableNames = []; | ||
for (var tableName in file.tables) { | ||
tableNames.push(tableName); | ||
} | ||
return tableNames; | ||
}, | ||
table: function (tableName) { | ||
@@ -468,0 +476,0 @@ if (file == null) { |
12
index.ts
@@ -458,2 +458,4 @@ import * as fs from 'fs' | ||
} | ||
// Returns thisDb | ||
@@ -495,2 +497,12 @@ const thisDb = { | ||
getTables() { | ||
const tableNames: string[] = [] | ||
for (let tableName in file.tables) { | ||
tableNames.push(tableName) | ||
} | ||
return tableNames | ||
}, | ||
table(tableName: string) { | ||
@@ -497,0 +509,0 @@ if (file == null) { |
{ | ||
"name": "node-json-database", | ||
"version": "0.0.21", | ||
"version": "0.0.22", | ||
"description": "JS Database Management System using JSON files", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
77065
1674