- function findPropertyValueOnTag(universe, tag, property, propertyValue, allowing) {
- // If the tag does not exist in the universe, then it definitely can't
- // have this specific property value.
- if (!_.has(universe, tag)) {
- return false;
- }
-
- const key = `${property}:${propertyValue}`;
-
- // Track whether a tag was touched by a filter rule that allows specific
- // property values on this particular tag.
- // @see generateUniverseFromFeatureRequirements
- if (allowing) {
- universe[tag].touchedByAllowedPropertyRule = true;
- }
-
- // The simple case: no wildcard in property value.
- if (_.indexOf(propertyValue, '*') === -1) {
- if (_.has(universe, tag) && _.has(universe[tag], key)) {
- if (allowing) {
- universe[tag][key] = true;
- }
- return true;
- }
- return false;
+ function findPropertyValuesOnTag(
+ universe,
+ tag,
+ property,
+ propertyValues,
+ allowing,
+ ) {
+ // Detect the wildcard case.
+ if (tag === '*') {
+ return findPropertyValuesOnAllTags(
+ universe,
+ property,
+ propertyValues,
+ allowing,
+ );