1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-18 23:07:45 +02:00

All: Resolves #443: Various optimisations to make dealing with large notes easier and make Katex re-rendering faster

This commit is contained in:
Laurent Cozic
2018-05-10 12:02:39 +01:00
parent ef2ffd4e52
commit b9118a90be
5 changed files with 114 additions and 21 deletions

View File

@ -45,4 +45,17 @@ ArrayUtils.findByKey = function(array, key, value) {
return null;
}
ArrayUtils.contentEquals = function(array1, array2) {
if (array1 === array2) return true;
if (!array1.length && !array2.length) return true;
if (array1.length !== array2.length) return false;
for (let i = 0; i < array1.length; i++) {
const a1 = array1[i];
if (array2.indexOf(a1) < 0) return false;
}
return true;
}
module.exports = ArrayUtils;