@bbn/bbn 1.0.419 → 1.0.421
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/bbn.js +1 -1
- package/dist/bbn.js.map +1 -1
- package/dist/fn/object/search.js +0 -9
- package/package.json +1 -1
package/dist/fn/object/search.js
CHANGED
|
@@ -102,16 +102,10 @@ import isArray from '../type/isArray.js';
|
|
|
102
102
|
* @returns {Number} The index if found, otherwise -1
|
|
103
103
|
*/
|
|
104
104
|
export default function search(arr, prop, val, operator, startFrom, backward) {
|
|
105
|
-
var _a;
|
|
106
105
|
if (val === void 0) { val = null; }
|
|
107
106
|
if (operator === void 0) { operator = '='; }
|
|
108
107
|
if (startFrom === void 0) { startFrom = 0; }
|
|
109
108
|
if (backward === void 0) { backward = false; }
|
|
110
|
-
var isWatching = false;
|
|
111
|
-
if ((_a = window.bbnData) === null || _a === void 0 ? void 0 : _a.isWatching) {
|
|
112
|
-
isWatching = true;
|
|
113
|
-
window.bbnData.stopWatching();
|
|
114
|
-
}
|
|
115
109
|
if (!isIterable(arr)) {
|
|
116
110
|
throw new Error(bbn._('The first argument for a search should be iterable') + ' ' + typeof arr + ' ' + bbn._('given'));
|
|
117
111
|
}
|
|
@@ -224,9 +218,6 @@ export default function search(arr, prop, val, operator, startFrom, backward) {
|
|
|
224
218
|
}
|
|
225
219
|
}
|
|
226
220
|
}
|
|
227
|
-
if (isWatching) {
|
|
228
|
-
window.bbnData.startWatching();
|
|
229
|
-
}
|
|
230
221
|
return res;
|
|
231
222
|
}
|
|
232
223
|
;
|