UNPKG
imma
Version:
latest (0.0.1)
0.0.1
A collection of functions for dealing with native arrays and objects immutably
imma
/
lib
/
array
/
equalsWith.js
9 lines
(8 loc)
•
194 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
'use strict'
const
equalsWith =
module
.
exports
=
(
a, b, fn
) =>
{
if
(a.
length
!== b.
length
)
return
false
for
(
let
i
in
a) {
if
(!
fn
(a[i], b[i]))
return
false
}
return
true
}