MCPcopy Create free account
hub / github.com/shoutem/theme / createNormalizers

Method createNormalizers

src/StyleNormalizer/StyleNormalizer.js:18–32  ·  view source on GitHub ↗
(prop, shorthands, suffix = '')

Source from the content-addressed store, hash-verified

16 }
17
18 createNormalizers(prop, shorthands, suffix = '') {
19 shorthands.forEach(shorthand => {
20 const propName = prop + shorthand.type + suffix;
21
22 if (this.normalizerExists(propName)) {
23 throw Error(`Normalizer for '${propName}' shorthand already exists`);
24 }
25
26 this.normalizers[propName] = ShorthandsNormalizerFactory.createNormalizer(
27 prop,
28 shorthand,
29 suffix,
30 );
31 });
32 }
33
34 normalizerExists(normalizerName) {
35 return !!this.normalizers[normalizerName];

Callers 2

constructorMethod · 0.95

Calls 2

normalizerExistsMethod · 0.95
createNormalizerMethod · 0.80

Tested by

no test coverage detected