MCPcopy Index your code
hub / github.com/MrPrimate/ddb-proxy / getClassOptionModifiers

Function getClassOptionModifiers

filterModifiers.js:98–121  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

96}
97
98function 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

Callers 1

mainFunction · 0.85

Calls 1

getClassFeaturesFunction · 0.85

Tested by

no test coverage detected