react-native/Libraries/Utilities/differ/insetsDiffer.js

27 lines
492 B
JavaScript
Raw Normal View History

2015-01-30 01:10:49 +00:00
/**
* 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;