UNPKG
react-stripe-elements
Version:
latest (6.1.2)
6.1.2
6.1.1
6.1.0
6.0.1
5.1.0
5.0.1
5.0.0
4.0.2
4.0.1
4.0.0
3.0.1
3.0.0
2.0.3
2.0.2
2.0.1
2.0.0
1.7.0
1.6.0
1.5.0
1.4.1
1.4.0
1.3.2
1.3.1
1.2.1
1.2.0
1.1.1
1.1.0
1.0.1
1.0.0
0.1.0
0.0.8
0.0.7
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1
React components for Stripe.js and Stripe Elements
stripe/react-stripe-elements
react-stripe-elements
/
src
/
utils
/
shallowEqual.js
14 lines
(10 loc)
•
288 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// @flow
const
shallowEqual = (
a
:
Object
,
b
:
Object
):
boolean
=>
{
const
keysA =
Object
.
keys
(a);
const
keysB =
Object
.
keys
(b);
return
( keysA.
length
=== keysB.
length
&& keysA.
every
(
(
key
) =>
b.
hasOwnProperty
(key) && b[key] === a[key]) ); };
export
default
shallowEqual;