(map)
| 465 | * @returns {boolean | ((value: string) => string)} true/false, when unconditionally true/false, or a template function to determine the value at runtime |
| 466 | */ |
| 467 | const compileBooleanMatcher = (map) => { |
| 468 | const positiveItems = Object.keys(map).filter((i) => map[i]); |
| 469 | const negativeItems = Object.keys(map).filter((i) => !map[i]); |
| 470 | |
| 471 | if (positiveItems.length === 0) { |
| 472 | return false; |
| 473 | } |
| 474 | |
| 475 | if (negativeItems.length === 0) { |
| 476 | return true; |
| 477 | } |
| 478 | |
| 479 | return compileBooleanMatcherFromLists(positiveItems, negativeItems); |
| 480 | }; |
| 481 | |
| 482 | module.exports = { |
| 483 | ABSOLUTE_PUBLIC_PATH, |
no test coverage detected
searching dependent graphs…