@xuda.io/xuda-dbs-plugin-xuda 1.0.29 → 1.0.30

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/server.js +6 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/xuda-dbs-plugin-xuda",
3
- "version": "1.0.29",
3
+ "version": "1.0.30",
4
4
  "description": "Xuda Database Socket for Xuda's proprietary structure powered by CouchDB",
5
5
  "scripts": {
6
6
  "pub": "npm version patch --force && npm publish --access public"
package/server.js CHANGED
@@ -164,6 +164,12 @@ const find_item_by_key_root = function (arr, key, val) {
164
164
  });
165
165
  };
166
166
 
167
+ const find_item_by_key = function (arr, key, val) {
168
+ return _.find(arr, function (e) {
169
+ return e.data[key] === val;
170
+ });
171
+ };
172
+
167
173
  exports.create = async (params, setup_doc, resolve, reject) => {
168
174
  const e = params.e;
169
175
  const db = params.db;
@@ -1044,7 +1050,6 @@ exports.restore = async (params, setup_doc, resolve, reject) => {
1044
1050
 
1045
1051
  exports.test_connection = async (params, setup_doc, resolve, reject) => {
1046
1052
  try {
1047
- debugger;
1048
1053
  if (!setup_doc.db_connection_string) throw "db_connection_string missing";
1049
1054
  const nano = require("nano")(setup_doc.db_connection_string);
1050
1055