FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
parse-server/src/LiveQuery/equalObjects.js at master · ultimateprogramer/parse-server · GitHub
ultimateprogramer
/
parse-server
Public
forked from
parse-community/parse-server
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
parse-server
/
src
/
LiveQuery
/
equalObjects.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
48 lines (46 loc) · 1000 Bytes
Breadcrumbs
parse-server
/
src
/
LiveQuery
/
equalObjects.js
Copy path
File metadata and controls
48 lines (46 loc) · 1000 Bytes
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
var
toString
=
Object
.
prototype
.
toString
;
/**
* Determines whether two objects represent the same primitive, special Parse
* type, or full Parse Object.
*/
function
equalObjects
(
a
,
b
)
{
if
(
typeof
a
!==
typeof
b
)
{
return
false
;
}
if
(
typeof
a
!==
'object'
)
{
return
(
a
===
b
)
;
}
if
(
a
===
b
)
{
return
true
;
}
if
(
toString
.
call
(
a
)
===
'[object Date]'
)
{
if
(
toString
.
call
(
b
)
===
'[object Date]'
)
{
return
(
+
a
===
+
b
)
;
}
return
false
;
}
if
(
Array
.
isArray
(
a
)
)
{
if
(
Array
.
isArray
(
b
)
)
{
if
(
a
.
length
!==
b
.
length
)
{
return
false
;
}
for
(
var
i
=
0
;
i
<
a
.
length
;
i
++
)
{
if
(
!
equalObjects
(
a
[
i
]
,
b
[
i
]
)
)
{
return
false
;
}
}
return
true
;
}
return
false
;
}
if
(
Object
.
keys
(
a
)
.
length
!==
Object
.
keys
(
b
)
.
length
)
{
return
false
;
}
for
(
var
key
in
a
)
{
if
(
!
equalObjects
(
a
[
key
]
,
b
[
key
]
)
)
{
return
false
;
}
}
return
true
;
}
module
.
exports
=
equalObjects
;
Back
|
FazBrowse Home
|
New Git URL