(data)
| 96 | } |
| 97 | |
| 98 | function getClassOptionModifiers(data) { |
| 99 | |
| 100 | const classFeatures = data.classes.map((cls) => { |
| 101 | return getClassFeatures(cls, cls.level); |
| 102 | }).flat(); |
| 103 | |
| 104 | |
| 105 | const modifiers = data.modifiers.class.filter(classModifier => { |
| 106 | const componentId = classModifier.componentId; |
| 107 | const feature = classFeatures.find(feature => feature.id === componentId); |
| 108 | |
| 109 | if (feature === undefined) { |
| 110 | console.log( |
| 111 | ` [ EXTRA] Modifier found: ${classModifier.friendlyTypeName} (${ |
| 112 | classModifier.friendlySubtypeName |
| 113 | })` |
| 114 | ); |
| 115 | return true; |
| 116 | } |
| 117 | return false; |
| 118 | }); |
| 119 | |
| 120 | return modifiers; |
| 121 | } |
| 122 | |
| 123 | /** |
| 124 | * Filters the modifiers with the utility functions above |
no test coverage detected