mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-26 07:04:05 +08:00
Initial commit
This commit is contained in:
19
Libraries/Utilities/differ/pointsDiffer.js
Normal file
19
Libraries/Utilities/differ/pointsDiffer.js
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Copyright 2004-present Facebook. All Rights Reserved.
|
||||
*
|
||||
* @providesModule pointsDiffer
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
var dummyPoint = {x: undefined, y: undefined};
|
||||
|
||||
var pointsDiffer = function(one, two) {
|
||||
one = one || dummyPoint;
|
||||
two = two || dummyPoint;
|
||||
return one !== two && (
|
||||
one.x !== two.x ||
|
||||
one.y !== two.y
|
||||
);
|
||||
};
|
||||
|
||||
module.exports = pointsDiffer;
|
||||
Reference in New Issue
Block a user