MCPcopy Index your code
hub / github.com/developit/microbundle / processCssmodulesArgument

Function processCssmodulesArgument

src/lib/css-modules.js:40–49  ·  view source on GitHub ↗

* This is done because if you use the cli default property, you get a primiatve "null" or "false", * but when using the cli arguments, you always get back strings. This method aims at correcting those * for both realms. So that both realms _convert_ into primatives.

(options)

Source from the content-addressed store, hash-verified

38 * for both realms. So that both realms _convert_ into primatives.
39 */
40function processCssmodulesArgument(options) {
41 if (options['css-modules'] === 'true' || options['css-modules'] === true)
42 return true;
43 if (options['css-modules'] === 'false' || options['css-modules'] === false)
44 return false;
45 if (options['css-modules'] === 'null' || options['css-modules'] === null)
46 return null;
47
48 return options['css-modules'];
49}

Callers 2

shouldCssModulesFunction · 0.85
cssModulesConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…