From 94a868e4d5e4547e4a2d2f2c6b4f19571401b34d Mon Sep 17 00:00:00 2001 From: Sai Raj <39055732+sairajzero@users.noreply.github.com> Date: Sat, 6 Jun 2020 16:46:59 +0530 Subject: [PATCH] Update index.html --- index.html | 10542 +++++++++++++++++++++++++++------------------------ 1 file changed, 5610 insertions(+), 4932 deletions(-) diff --git a/index.html b/index.html index fedd828..610146a 100644 --- a/index.html +++ b/index.html @@ -1,792 +1,848 @@ - - + - Content Collaboration + Content Collaboration - - - - - - -
-
- - -
-
- - -
- - -
- - - - - - - -

- -
- -
-
-
- - + }); + + if(obj.constructor.toString().indexOf("Array") != -1) {obj = obj.filter(function (el) { + return el != null; + });} + + return obj; + } + + /*obj is original object or array, diff is the output of findDifference */ + window.mergeDifference = (obj,diff) => { + if(Object.keys(diff.updated).length !== 0) + obj = mergeRecursive(obj,diff.updated) + if(Object.keys(diff.deleted).length !== 0){ + obj = mergeRecursive(obj,diff.deleted) + obj = cleanse(obj) + } + if(Object.keys(diff.added).length !== 0) + obj = mergeRecursive(obj,diff.added) + return obj + } +})(); + - - + - + - + - + - + + + }).catch(error => console.error(error)) + } + - - \ No newline at end of file +