({
/** Every condition must be true */
asLongAs = [() => true],
/** At least one condition must be true */
include = [() => true],
/** No conditions must be true */
exclude = [() => false],
}: RunConditions)
| 24 | || navigator.platform === 'iPad'; |
| 25 | |
| 26 | export async function shouldFeatureRun({ |
| 27 | /** Every condition must be true */ |
| 28 | asLongAs = [() => true], |
| 29 | /** At least one condition must be true */ |
| 30 | include = [() => true], |
| 31 | /** No conditions must be true */ |
| 32 | exclude = [() => false], |
| 33 | }: RunConditions): Promise<boolean> { |
| 34 | return await pEveryFunction(asLongAs, c => c()) |
| 35 | && await pSomeFunction(include, c => c()) |
| 36 | && pEveryFunction(exclude, async c => !await c()); |
| 37 | } |
no test coverage detected