chore: make firmware update log shorter (#675)

* chore: add lodash to the roor package.json

* chore: make firmware update log shorter
This commit is contained in:
Róbert Kiss
2018-06-13 10:07:40 +02:00
committed by László Monda
parent 9ef11eaa34
commit c4d7318686
9 changed files with 50 additions and 35 deletions

View File

@@ -0,0 +1,15 @@
import { isEqual } from 'lodash';
export const isEqualArray = (arr1: Array<any>, arr2: Array<any>): boolean => {
if (arr1.length !== arr2.length) {
return false;
}
for (const a of arr1) {
if (!arr2.some(b => isEqual(a, b))) {
return false;
}
}
return true;
};