MCPcopy Index your code
hub / github.com/refined-github/refined-github / shouldFeatureRun

Function shouldFeatureRun

source/helpers/feature-utils.ts:26–37  ·  view source on GitHub ↗
({
	/** Every condition must be true */
	asLongAs = [() => true],
	/** At least one condition must be true */
	include = [() => true],
	/** No conditions must be true */
	exclude = [() => false],
}: RunConditions)

Source from the content-addressed store, hash-verified

24 || navigator.platform === 'iPad';
25
26export 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}

Callers 2

addFunction · 0.85

Calls 2

pEveryFunctionFunction · 0.85
pSomeFunctionFunction · 0.85

Tested by

no test coverage detected