Check if categories in the intent-filter corresponds to categories for Universal Links.

@param {Array} categories - list of categories in the intent-filter
@return {Boolean} true - if action for Universal Links; otherwise - false
335830
function isCategoriesForUniversalLinks(categories) {
  // there can be only 2 categories
  if (categories == null || categories.length != 2) {
    return false;
  }

  var isBrowsable = false;
  var isDefault = false;

  // check intent categories
  categories.forEach(function(category) {
    var categoryName = category['$']['android:name'];
    if (!isBrowsable) {
      isBrowsable = 'android.intent.category.BROWSABLE' === categoryName;
    }

    if (!isDefault) {
      isDefault = 'android.intent.category.DEFAULT' === categoryName;
    }
  });

  return isDefault && isBrowsable;
}
102468
private static void validateCategories(String... categories) {

        for (String category : categories) {
            if (!category.matches(FCM_TOPIC_PATTERN)) {
                throw new IllegalArgumentException(String.format("%s does not match %s", category, FCM_TOPIC_PATTERN));
            }
        }
    }
879023
function categories() {
  return getCategories()
    .then((body) => {
      const $ = cheerio.load(body, { normalizeWhitespace: false });

      return Promise.resolve($('div.tagcloud01 ul li a').get().map(el => el.children[0].data));
    })
    .catch(err => err);
}
1246680
function checkBrowser () {
        if (cordova.platformId === 'browser' && require('./isChrome')()) { // eslint-disable-line no-undef
            module.exports = window.requestFileSystem || window.webkitRequestFileSystem;
            return true;
        }
        return false;
    }
1295502
public boolean containsSameLinksAs(Iterable<Link> links) {

		Links other = Links.of(links);

		return this.links.size() != other.links.size() ? false : this.links.containsAll(other.links);
	}
89017
function checkLink(s) {
        return ((s.indexOf("http") === 0) || (s.indexOf(SLASH) === 0)) ? "<a href='" + s + "'>" + s + "</a>" : s;
    }
309773
public void setCategories(StringArray v) {
    if (GOMention_Type.featOkTst && ((GOMention_Type)jcasType).casFeat_categories == null)
      jcasType.jcas.throwFeatMissing("categories", "de.julielab.jules.types.GOMention");
    jcasType.ll_cas.ll_setRefValue(addr, ((GOMention_Type)jcasType).casFeatCode_categories, jcasType.ll_cas.ll_getFSRef(v));}
1293327
function(sCategory) {
        var filtersArray = this._categoryFilters;
        // Don't do anything if category is already enabled
        // Use Array.indexOf if available...
        if(filtersArray.indexOf) {
             if(filtersArray.indexOf(sCategory) >  -1) {
                return;
            }
        }
        // ...or do it the old-fashioned way
        else {
            for(var i=0; i<filtersArray.length; i++) {
               if(filtersArray[i] === sCategory){
                    return;
                }
            }
        }

        this._categoryFilters.push(sCategory);
        this._filterLogs();
        var elCheckbox = this.getCheckbox(sCategory);
        if(elCheckbox) {
            elCheckbox.checked = true;
        }
    }
1246824
public void setCategories(List<String> categories) {

        if ((categories != null) && !categories.isEmpty()) {
            addFilterQuery(CmsSearchField.FIELD_CATEGORY + CmsSearchField.FIELD_DYNAMIC_EXACT, categories, true, true);
        }
    }
606713
function isActionForUniversalLinks(actions) {
  // there can be only 1 action
  if (actions == null || actions.length != 1) {
    return false;
  }

  var action = actions[0]['$']['android:name'];

  return ('android.intent.action.VIEW' === action);
}
999923
public function matchCategory($category)
    {
        $result = empty($this->categories);
        foreach ($this->categories as $allowedCategory) {
            if ($this->categoryContains($allowedCategory, $category)) {
                $result = true;
            }
        }
        foreach ($this->exceptions as $deniedCategory) {
            if ($this->categoryContains($deniedCategory, $category)) {
                $result = false;
            }
        }

        return $result;
    }
499573
public UnifiedPushConfig setCategories(List<String> categories) {
        validateCategories(categories.toArray(new String[categories.size()]));        
        this.categories = new ArrayList<String>(categories);
        return this;
    }
826876
function extractCategoryMap(oSentence) {
    var res = {};
    debuglog(debuglog.enabled ? ('extractCategoryMap ' + JSON.stringify(oSentence)) : '-');
    oSentence.forEach(function (oWord, iIndex) {
        if (oWord.category === IFMatch.CAT_CATEGORY) {
            res[oWord.matchedString] = res[oWord.matchedString] || [];
            res[oWord.matchedString].push({ pos: iIndex });
        }
    });
    utils.deepFreeze(res);
    return res;
}
777061
private Category getSelectedCategoryByMatch() {
    // Strategy: Go from most specific match to most unspecific match
    Category firstFilteredSetting =
        filteredSettingsLst.size() == 0 ? null : settingCategoryMap.get(filteredSettingsLst.get(0));
    Category firstFilteredGroup =
        filteredGroupsLst.size() == 0 ? null : groupCategoryMap.get(filteredGroupsLst.get(0));
    Category firstFilteredCategory =
        filteredCategoriesLst.size() == 0 ? null : filteredCategoriesLst.get(0);
    return compareMatches(
        firstFilteredSetting, firstFilteredGroup, firstFilteredCategory,
        settingMatches, groupMatches, categoryMatches
    );
  }
338009
public boolean supportsCategory(String category) {
		if (category == null) {
			return false;
		}

		List<String> categories = this.getCategories();
		for (String cat : categories) {
			if (cat.compareToIgnoreCase(category) == 0) {
				return true;
			}
		}

		return false;
	}
110765
public static boolean isLauncherActivity(Intent intent) {
        if (intent == null)
            return false;

        if (StringUtils.isNullOrEmpty(intent.getAction())) {
            return false;
        }

        if (intent.getCategories() == null)
            return false;

        return Intent.ACTION_MAIN.equals(intent.getAction())
                && intent.getCategories().contains(Intent.CATEGORY_LAUNCHER);
    }
665171
function list(category){
	let list = [];

	if (category && typeof(category) === 'string') {
		list = _(goblin.ambush).filter(function(current) {
			return _.includes(current.category, category);
		}).map('id').value();
	} else {
		list = _(goblin.ambush).map('id').value();
	}
	
	return list;

}