1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const test_1 = require("../test");
|
4 | /**
|
5 | Test all the values in the collection against a provided predicate.
|
6 |
|
7 | @hidden
|
8 | @param source Source collection to test.
|
9 | @param name The name to call the collection of values, such as `values` or `keys`.
|
10 | @param predicate Predicate to test every item in the source collection against.
|
11 | */
|
12 | exports.default = (source, name, predicate) => {
|
13 | try {
|
14 | for (const item of source) {
|
15 | test_1.default(item, name, predicate, false);
|
16 | }
|
17 | return true;
|
18 | }
|
19 | catch (error) {
|
20 | return error.message;
|
21 | }
|
22 | };
|