MCPcopy Index your code
hub / github.com/andywer/webpack-blocks / when

Function when

packages/core/lib/when.js:13–21  ·  view source on GitHub ↗

* Applies an array of webpack blocks only if `condition` is true. * * @param {boolean} condition Condition to test * @param {Function[]} configSetters Array of functions as returned by webpack blocks. * @return {Function}

(condition, configSetters)

Source from the content-addressed store, hash-verified

11 * @return {Function}
12 */
13function when(condition, configSetters) {
14 assertConfigSetters(configSetters)
15
16 if (condition) {
17 return group(configSetters)
18 } else {
19 return () => config => config
20 }
21}

Callers 1

when.test.jsFile · 0.85

Calls 2

assertConfigSettersFunction · 0.85
groupFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…