1 | import { testSymbol } from './predicates/base-predicate.js';
|
2 | /**
|
3 | Validate the value against the provided predicate.
|
4 |
|
5 | @hidden
|
6 |
|
7 | @param value - Value to test.
|
8 | @param label - Label which should be used in error messages.
|
9 | @param predicate - Predicate to test to value against.
|
10 | @param idLabel - If true, the label is a variable or type. Default: true.
|
11 | */
|
12 | export default function test(value, label, predicate, idLabel = true) {
|
13 | predicate[testSymbol](value, test, label, idLabel);
|
14 | }
|