Skip to content
This repository was archived by the owner on Oct 17, 2021. It is now read-only.

Commit cd85948

Browse files
author
Jack Chan
committed
add before to deleted & updated
1 parent 6296889 commit cd85948

File tree

4 files changed

+2061
-1196
lines changed

4 files changed

+2061
-1196
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"babel-preset-es2015": "^6.18.0",
3131
"babel-preset-stage-0": "^6.16.0",
3232
"coveralls": "^3.0.0",
33-
"jest": "^23.6.0"
33+
"jest": "^26.4.2"
3434
},
3535
"babel": {
3636
"presets": [

src/deleted/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const deletedDiff = (lhs, rhs) => {
1515
return { ...acc, [key]: difference };
1616
}
1717

18-
return { ...acc, [key]: undefined };
18+
return { ...acc, [key]: { before: l[key] ,after: undefined } };
1919
}, {});
2020
};
2121

src/updated/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const updatedDiff = (lhs, rhs) => {
2121

2222
if (isObject(difference) && isEmpty(difference) && !isDate(difference)) return acc;
2323

24-
return { ...acc, [key]: difference };
24+
return { ...acc, [key]: { before: l[key], after: difference } };
2525
}
2626

2727
return acc;

0 commit comments

Comments
 (0)