@bbn/bbn 1.0.372 → 1.0.374

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.
package/dist/db.js CHANGED
@@ -2,6 +2,8 @@ import _ from './_.js';
2
2
  import each from './fn/loop/each.js';
3
3
  import iterate from './fn/loop/iterate.js';
4
4
  import log from './fn/browser/log.js';
5
+ import isObject from './fn/type/isObject.js';
6
+ import isArray from './fn/type/isArray.js';
5
7
  var idb = window['indexedDB'] || window['webkitIndexedDB'] || window['mozIndexedDB'] || window['OIndexedDB'] || window['msIndexedDB'];
6
8
  var transformResult = function (obj, fields) {
7
9
  if (fields === null || fields === void 0 ? void 0 : fields.length) {
@@ -113,7 +115,7 @@ var dbObject = function (dbName) {
113
115
  var _a = getStore(table, 'r'), tx = _a[0], store = _a[1];
114
116
  var arch = structure[table];
115
117
  var primary = arch.keys.PRIMARY.columns.length > 1 ? arch.keys.PRIMARY.columns : arch.keys.PRIMARY.columns[0];
116
- var search = bbn.fn.isObject(where) ? Object.keys(where)[0] : (where ? primary : null);
118
+ var search = isObject(where) ? Object.keys(where)[0] : (!where || isArray(where) ? null : primary);
117
119
  var results = [];
118
120
  if (search === primary) {
119
121
  if (bbn.fn.isArray(where === null || where === void 0 ? void 0 : where[primary])) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbn/bbn",
3
- "version": "1.0.372",
3
+ "version": "1.0.374",
4
4
  "description": "Javascript toolkit",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",