1 |
|
2 |
|
3 | function orLogical (keys, interator, value, operator) {
|
4 | return keys.some(interator.bind(null, value, operator))
|
5 | }
|
6 |
|
7 | function andLogical (keys, interator, value, operator) {
|
8 | return keys.every(interator.bind(null, value, operator))
|
9 | }
|
10 |
|
11 | function notLogical (keys, interator, value, operator) {
|
12 | return !keys.every(interator.bind(null, value, operator))
|
13 | }
|
14 |
|
15 | module.exports = {
|
16 | andLogical,
|
17 | orLogical,
|
18 | notLogical
|
19 | }
|