FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
JavaScript/archive/code/node_modules/fast-deep-equal/react.js at main · iu5git/JavaScript · GitHub
iu5git
/
JavaScript
Public
Notifications
You must be signed in to change notification settings
Fork
21
Star
52
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
JavaScript
/
archive
/
code
/
node_modules
/
fast-deep-equal
/
react.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
53 lines (37 loc) · 1.42 KB
Breadcrumbs
JavaScript
/
archive
/
code
/
node_modules
/
fast-deep-equal
/
react.js
Copy path
File metadata and controls
executable file
·
53 lines (37 loc) · 1.42 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
'use strict'
;
// do not edit .js files directly - edit src/index.jst
module
.
exports
=
function
equal
(
a
,
b
)
{
if
(
a
===
b
)
return
true
;
if
(
a
&&
b
&&
typeof
a
==
'object'
&&
typeof
b
==
'object'
)
{
if
(
a
.
constructor
!==
b
.
constructor
)
return
false
;
var
length
,
i
,
keys
;
if
(
Array
.
isArray
(
a
)
)
{
length
=
a
.
length
;
if
(
length
!=
b
.
length
)
return
false
;
for
(
i
=
length
;
i
--
!==
0
;
)
if
(
!
equal
(
a
[
i
]
,
b
[
i
]
)
)
return
false
;
return
true
;
}
if
(
a
.
constructor
===
RegExp
)
return
a
.
source
===
b
.
source
&&
a
.
flags
===
b
.
flags
;
if
(
a
.
valueOf
!==
Object
.
prototype
.
valueOf
)
return
a
.
valueOf
(
)
===
b
.
valueOf
(
)
;
if
(
a
.
toString
!==
Object
.
prototype
.
toString
)
return
a
.
toString
(
)
===
b
.
toString
(
)
;
keys
=
Object
.
keys
(
a
)
;
length
=
keys
.
length
;
if
(
length
!==
Object
.
keys
(
b
)
.
length
)
return
false
;
for
(
i
=
length
;
i
--
!==
0
;
)
if
(
!
Object
.
prototype
.
hasOwnProperty
.
call
(
b
,
keys
[
i
]
)
)
return
false
;
for
(
i
=
length
;
i
--
!==
0
;
)
{
var
key
=
keys
[
i
]
;
if
(
key
===
'_owner'
&&
a
.
$$typeof
)
{
// React-specific: avoid traversing React elements' _owner.
// _owner contains circular references
// and is not needed when comparing the actual elements (and not their owners)
continue
;
}
if
(
!
equal
(
a
[
key
]
,
b
[
key
]
)
)
return
false
;
}
return
true
;
}
// true if both NaN, false otherwise
return
a
!==
a
&&
b
!==
b
;
}
;
Back
|
FazBrowse Home
|
New Git URL