UNPKG
react-sizes
Version:
latest (2.0.0)
next (2.0.0)
2.0.0
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
1.0.0-beta.1
1.0.0-beta.0
0.4.3
0.4.2
0.4.1
0.3.3
0.3.2
0.3.1
0.3.0
0.2.0
0.1.2
0.1.1
0.1.0
0.0.4
0.0.3
0.0.2
Hoc to easily map window sizes to props.
github.com/renatorib/react-sizes
renatorib/react-sizes
react-sizes
/
src
/
utils
/
shallowDiff.js
14 lines
(10 loc)
•
195 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
const
shallowDiff
= (
a, b
) => {
for
(
let
i
in
a) {
if
(!(i
in
b))
return
true
}
for
(
let
i
in
b) {
if
(a[i] !== b[i])
return
true
}
return
false
}
export
default
shallowDiff