Test if a plugin is listed
@param { {List<PluginDependency}} deps
@param {String} plugin
@param {String} version
@return {Boolean}
345420
function hasPlugin(deps, pluginName, version) {
    return !!deps.find(function(dep) {
        return dep.getName() === pluginName && (!version || dep.getVersion() === version);
    });
}
1083402
function checkIfVersionUpdated() {

        var latestBuildNumber = updateJsonHandler.get("latestBuildNumber"),
            currentBuildNumber = Number(/-([0-9]+)/.exec(brackets.metadata.version)[1]);

        return latestBuildNumber === currentBuildNumber;
    }
463262
public static function check(Plugin $plugin, ReflectionClass $info) : bool
  {
    /**
     * Check if plugin meets the minimum requirements
     */
    if (
      array_key_exists('PACKAGE', $info->getConstants()) &&
      array_key_exists('VERSION', $info->getConstants()) &&
      (
        array_key_exists('AUTHORS', $info->getConstants()) &&
        is_array($info->getConstants()['AUTHORS'])
      ) &&
      array_key_exists('FRAMEWORK', $info->getConstants())
    ) {
      return self::isCompatable($plugin);
    }

    /**
     * Plugin does not meet the minimum requirements
     */
    return false;
  }
683611
function isPropagatingVersion(uri) {
  const version = uri.split('@')[1];

  return !!version && _.includes(propagatingVersions, version);
}
840712
private boolean isDepOfIdlArtifact(Artifact artifact, Map<String, Artifact> depsMap) {
    List<String> depTrail = artifact.getDependencyTrail();
    // depTrail can be null sometimes, which seems like a maven bug
    if (depTrail != null) {
      for (String name : depTrail) {
        Artifact dep = depsMap.get(name);
        if (dep != null && isIdlCalssifier(dep, classifier)) {
          return true;
        }
      }
    }
    return false;
  }
1318087
public boolean isModifiedOnVersion(String version) {
		if (version == null || version.isEmpty()) {
			return true;
		}
		for (ModificationRecord record : this.modificationRecordList) {
			if (record.isModifiedOnVersion(version)) {
				return true;
			}
		}
		return false;
	}
1165248
private static function isCompatable(Plugin $plugin) : bool
  {
    $frameworkVersion = substr(self::getVersion(), 0, strrpos(self::getVersion(), '*'));
    $pluginVersions   = explode('|', $plugin::FRAMEWORK);

    foreach($pluginVersions as $version) {
      $version = substr($version, 0, strrpos($version, '*'));

      return starts_with($frameworkVersion, $version);
    }

    return false;
  }
225276
public boolean isModifiedOnVersion(String version) {
		if( this.modificationHistory.isModifiedOnVersion(version)
				|| this.outParameter.isModifiedOnVersion(version) ) {
			return true;
		}
		for(APIParameter inParameter : inParameters) {
			if(inParameter.isModifiedOnVersion(version)) {
				return true;
			}
		}
		return false;
	}
101785
public static boolean isValidVersion(final String version) {
        return StringUtils.isNotBlank(version)
                && (ALTERNATE_PATTERN.matcher(version).matches() || STANDARD_PATTERN
                        .matcher(version).matches());
    }
354797
def _in_version(self, *versions):
        ""
        for version in versions:
            if (self._version == version
                or (isinstance(self._version, collections.Container) 
                    and version in self._version)):
                return True
        return False
1045135
def _check_deprecated(self, dest, kwargs):
    """"""
    removal_version = kwargs.get('removal_version', None)
    if removal_version is not None:
      warn_or_error(
        removal_version=removal_version,
        deprecated_entity_description="option '{}' in {}".format(dest, self._scope_str()),
        deprecation_start_version=kwargs.get('deprecation_start_version', None),
        hint=kwargs.get('removal_hint', None),
        stacklevel=9999)
1222316
private boolean isDependentOn(GrailsPlugin plugin, GrailsPlugin dependency) {
        for (String name : plugin.getDependencyNames()) {
            String requiredVersion = plugin.getDependentVersion(name);

            if (name.equals(dependency.getName()) &&
                    GrailsVersionUtils.isValidVersion(dependency.getVersion(), requiredVersion))
                return true;
        }
        return false;
    }
166615
def _has_tag(version, debug=False):
    
    cmd = sh.git.bake('show-ref', '--verify', '--quiet',
                      "refs/tags/{}".format(version))
    try:
        util.run_command(cmd, debug=debug)
        return True
    except sh.ErrorReturnCode:
        return False
327918
function checkPlugins(pugs) {
    var def_pugs_obj = {};
    for(var i = 0;i < def_pugs_lst.length;i++)
        def_pugs_obj[def_pugs_lst[i]] = {'name': def_pugs_lst[i], 'enable': true};
    var _t = [];
    for(var i = 0;i < pugs.length;i++) {
        if(!(pugs[i] instanceof Object) || !(pugs[i].plugin instanceof Object)) continue;
        var pug_name = pugs[i].plugin.name;
        if(!pug_name) continue;
        if(pugs[i].plugin.enable == null || pugs[i].plugin.enable == undefined || pugs[i].plugin.enable != true)
            pugs[i].plugin.enable = false;
        if(def_pugs_obj[pug_name]) {
            def_pugs_obj[pug_name] = pugs[i].plugin;
        }
        else _t.push(pugs[i].plugin);
    }

    for(var i = def_pugs_lst.length - 1;i >= 0;i--) {
        _t.unshift(def_pugs_obj[def_pugs_lst[i]]);
    }
    return _t;
}
513330
function isVersionAtLeast(dottedVersion, major, minor, patch){
	var i, v, t,
		verParts = $.map($.trim(dottedVersion).split("."), function(e){ return parseInt(e, 10); }),
		testParts = $.map(Array.prototype.slice.call(arguments, 1), function(e){ return parseInt(e, 10); });

	for( i = 0; i < testParts.length; i++ ){
		v = verParts[i] || 0;
		t = testParts[i] || 0;
		if( v !== t ){
			return ( v > t );
		}
	}
	return true;
}
344669
private boolean isAtLeastOneExcludePresent(Plugin plugin) throws MojoExecutionException {
        Xpp3Dom configuration = (Xpp3Dom) plugin.getConfiguration();
        if (configuration == null) return false;
        Xpp3Dom excludesDom = configuration.getChild(EXCLUDES_PARAM_NAME);
        if (excludesDom == null) return false;
        for (Xpp3Dom excludeDom : excludesDom.getChildren()) {
            if (excludeDom.getName().equals(EXCLUDE_PARAM_NAME)) return true;
        }
        return false;
    }
409356
function isPluginFunction(plugin) {
	return _.isFunction(plugin) || _.isFunction(_.head(plugin));
}