1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-12 22:57:38 +02:00

Support importing JEX and raw data

This commit is contained in:
Laurent Cozic
2018-02-25 17:01:16 +00:00
parent 39ddd934f6
commit 8f2e5faff3
8 changed files with 431 additions and 7 deletions

View File

@ -28,4 +28,20 @@ ObjectUtils.sortByValue = function(object) {
return output;
}
ObjectUtils.fieldsEqual = function(o1, o2) {
if ((!o1 || !o2) && (o1 !== o2)) return false;
for (let k in o1) {
if (!o1.hasOwnProperty(k)) continue;
if (o1[k] !== o2[k]) return false;
}
const c1 = Object.getOwnPropertyNames(o1);
const c2 = Object.getOwnPropertyNames(o2);
if (c1.length !== c2.length) return false;
return true;
}
module.exports = ObjectUtils;