|
Last change
on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago |
|
Added visualizations
|
-
Property mode
set to
100644
|
|
File size:
783 bytes
|
| Rev | Line | |
|---|
| [a762898] | 1 | 'use strict';
|
|---|
| 2 |
|
|---|
| 3 | Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|---|
| 4 |
|
|---|
| 5 | const iteratee = require('./iteratee.js');
|
|---|
| 6 |
|
|---|
| 7 | function overEvery(...predicates) {
|
|---|
| 8 | return function (...values) {
|
|---|
| 9 | for (let i = 0; i < predicates.length; ++i) {
|
|---|
| 10 | const predicate = predicates[i];
|
|---|
| 11 | if (!Array.isArray(predicate)) {
|
|---|
| 12 | if (!iteratee.iteratee(predicate).apply(this, values)) {
|
|---|
| 13 | return false;
|
|---|
| 14 | }
|
|---|
| 15 | continue;
|
|---|
| 16 | }
|
|---|
| 17 | for (let j = 0; j < predicate.length; ++j) {
|
|---|
| 18 | if (!iteratee.iteratee(predicate[j]).apply(this, values)) {
|
|---|
| 19 | return false;
|
|---|
| 20 | }
|
|---|
| 21 | }
|
|---|
| 22 | }
|
|---|
| 23 | return true;
|
|---|
| 24 | };
|
|---|
| 25 | }
|
|---|
| 26 |
|
|---|
| 27 | exports.overEvery = overEvery;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.