(prop, shorthands, suffix = '')
| 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]; |
no test coverage detected