@bbn/bbn 1.0.183 → 1.0.185
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 +3 -1
- package/dist/bbn.js.map +1 -1
- package/dist/fn/object/mutateArray.js +2 -1
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { isArray } from '../type/isArray.js';
|
|
2
2
|
import { hash } from '../string/hash.js';
|
|
3
|
+
import { isSame } from '../type/isSame.js';
|
|
3
4
|
var mutateArray = function (a1, a2) {
|
|
4
5
|
if (!isArray(a1, a2)) {
|
|
5
6
|
throw new TypeError('mutateArray can only be called with arrays');
|
|
@@ -45,7 +46,7 @@ var mutateArray = function (a1, a2) {
|
|
|
45
46
|
while (a1.length > a2.length) {
|
|
46
47
|
a1.pop();
|
|
47
48
|
}
|
|
48
|
-
if (
|
|
49
|
+
if (!isSame(a1, a2)) {
|
|
49
50
|
bbn.fn.log(a1, a2);
|
|
50
51
|
throw new Error('mutateArray failed');
|
|
51
52
|
}
|