1 | ;
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.default = isValueSelected;
|
7 | // Determine if the toggle button value matches, or is contained in, the
|
8 | // candidate group value.
|
9 | function isValueSelected(value, candidate) {
|
10 | if (candidate === undefined || value === undefined) {
|
11 | return false;
|
12 | }
|
13 | if (Array.isArray(candidate)) {
|
14 | return candidate.includes(value);
|
15 | }
|
16 | return value === candidate;
|
17 | } |
\ | No newline at end of file |