mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-26 07:04:05 +08:00
[react-packager][streamline oss] Move open sourced JS source to react-native-github
This commit is contained in:
26
Libraries/Utilities/differ/insetsDiffer.js
Normal file
26
Libraries/Utilities/differ/insetsDiffer.js
Normal file
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* Copyright 2004-present Facebook. All Rights Reserved.
|
||||
*
|
||||
* @providesModule insetsDiffer
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
var dummyInsets = {
|
||||
top: undefined,
|
||||
left: undefined,
|
||||
right: undefined,
|
||||
bottom: undefined,
|
||||
};
|
||||
|
||||
var insetsDiffer = function(one, two) {
|
||||
one = one || dummyInsets;
|
||||
two = two || dummyInsets;
|
||||
return one !== two && (
|
||||
one.top !== two.top ||
|
||||
one.left !== two.left ||
|
||||
one.right !== two.right ||
|
||||
one.bottom !== two.bottom
|
||||
);
|
||||
};
|
||||
|
||||
module.exports = insetsDiffer;
|
||||
Reference in New Issue
Block a user