@bbn/bbn 1.0.43 → 1.0.44

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/bundle.js CHANGED
@@ -943,14 +943,14 @@
943
943
  return arr;
944
944
  }
945
945
  if (arr.length) {
946
- if (typeof (prop) === 'object') {
946
+ if (typeof prop === 'object') {
947
947
  operator = val;
948
948
  cfg = prop;
949
949
  }
950
950
  else if (typeof prop === 'string') {
951
951
  cfg[prop] = val;
952
952
  }
953
- else {
953
+ else if (!isFn) {
954
954
  throw new Error('Search function error: The prop argument should be a string or an object');
955
955
  }
956
956
  if (isFn) {
package/dist/fn/filter.js CHANGED
@@ -14,14 +14,14 @@ const filter = function (arr, prop, val = null, operator = '=') {
14
14
  return arr;
15
15
  }
16
16
  if (arr.length) {
17
- if (typeof (prop) === 'object') {
17
+ if (typeof prop === 'object') {
18
18
  operator = val;
19
19
  cfg = prop;
20
20
  }
21
21
  else if (typeof prop === 'string') {
22
22
  cfg[prop] = val;
23
23
  }
24
- else {
24
+ else if (!isFn) {
25
25
  throw new Error('Search function error: The prop argument should be a string or an object');
26
26
  }
27
27
  if (isFn) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbn/bbn",
3
- "version": "1.0.43",
3
+ "version": "1.0.44",
4
4
  "description": "Javascript toolkit",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",