UNPKG
quxt
Version:
latest (1.1.1)
1.1.1
1.1.0
1.0.0
Lodash but OVERPOWERED!
github.com/quxapp/quxt
quxapp/quxt
quxt
/
.internal
/
matches.js
13 lines
(12 loc)
•
243 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
function
matches
(
rule
) {
return
(
object
) =>
{
let
match =
true
for
(
const
[key, value]
of
Object
.
entries
(rule)) {
if
(
object
[key] !== value) { match =
false
} }
return
match } }
module
.
exports
= matches