Helper function to check a target object if there are no more positive values.
@param {Object} targets
@returns {Boolean}
544613
function targetComplete(target) {
    let complete = true;
    Object.values(target).forEach((value) => {
        if (value > 0)
            complete = false;
    });
    return complete;
}
1263446
function (anotherTarget) {
            var self = this, targets = self.getTargets();
            if (!util.inArray(anotherTarget, targets)) {
                targets.push(anotherTarget);
            }
            return self;
        }
382598
function any(target, fn) {
  var keys = Object.keys(target);
  for(var i = 0, len = keys.length; i < len; i++) {
    var key = keys[i];
    var value = target[key];
    if(fn(value, key)) return true;
  }
  return false;
}
162607
function( target, object ) {
    if ((
      typeof target === 'object' ||
      typeof target === 'function' ) &&
      typeof object === 'object'
    ) {
      for ( var name in object ) {
        if (object.hasOwnProperty( name )) {
          target[ name ] = object[ name ]
        }
      }
    }
    return target
  }
660108
function detectPorting(target) {
    const PORTING_DEV_DIR = path.join(config.dir.src, config.dir.porting);
    const PLATFORMS_ROOT = path.join(__dirname, '..', 'platforms');

    const valid_targets = [];

    // valid porting
    if (!fs.existsSync(PORTING_DEV_DIR)) {
        return valid_targets;
    }

    const temp_targets = [];

    if (null == target || 'all' === target) {
        temp_targets.push('dev');
        fs.readdirSync(PLATFORMS_ROOT)
        .forEach((find) => {
            const findPath = path.join(PLATFORMS_ROOT, find);
            if (fs.statSync(findPath).isDirectory()) {
                temp_targets.push(find);
            }
        });
    } else {
        const _targets = target.split(',');
        _targets.forEach((_tgt) => {
            temp_targets.push(_tgt);
        });
    }

    temp_targets.forEach((candidate) => {
        if ('dev' === candidate) {
            valid_targets.push('dev');
        } else {
            if (fs.existsSync(path.join('platforms', candidate, config.dir.porting))) {
                valid_targets.push(candidate);
            }
        }
    });

    return valid_targets;
}
939101
def _check_targets(self):
        

        if self.outputs:

            targets = self.outputs.copy()  # Namespace shortcut for speed.

            def check_targets(node_id):
                """
                Terminates ArciDispatch algorithm when all targets have been
                visited.

                :param node_id:
                    Data or function node id.
                :type node_id: str

                :return:
                    True if all targets have been visited, otherwise False.
                :rtype: bool
                """

                try:
                    targets.remove(node_id)  # Remove visited node.
                    return not targets  # If no targets terminate the algorithm.
                except KeyError:  # The node is not in the targets set.
                    return False
        else:
            # noinspection PyUnusedLocal
            def check_targets(node_id):
                return False

        return check_targets
1152661
function hasAtLeastOneKey(target, attrs) {
    var attrsLen = attrs.length;
    var i = 0;
    var counter = 0;
    for (; i < attrsLen; i++) {
      if (target[attrs[i]] !== undefined) {
        counter++;
      }
    }
    return !!counter;
  }
1224363
function parse_targets (targets) {
    debug('Parse: parse targets');
    for (let i = 0; i < targets.length; i++) {
        const target = targets[i];
        const name   = path.basename(target);
        if (is_special(name)) {
            special_targets.push(target);
            continue;
        }
        parse_target(target);
    }
}
531148
public static boolean isEmpty(String target, String... specialValueAsEmpty) {
		if (isEmpty(target)) {
			return true;
		}
		
		return matcher(target).isEmpty(specialValueAsEmpty);
	}
1241975
function (target, source) {
        var key;

        for (key in source) {
            if (source.hasOwnProperty(key) && !_.isUndefined(source[key])) {
                target[key] = source[key];
            }
        }

        return target;
    }
344645
def _check_negatives(numbers):
    ""

    negatives = filter(lambda x: x < 0, filter(None, numbers))
    if any(negatives):
        neg_values = ', '.join(map(str, negatives))
        msg = 'Found negative value(s): {0!s}. '.format(neg_values)
        msg += 'While not forbidden, the output will look unexpected.'
        warnings.warn(msg)
995175
def satisfies?(target)
      target = Semverse::Version.coerce(target)

      return false if !(version == 0) && greedy_match?(target)

      compare(target)
    end
873823
function(targets){
            targets = targets || [];
            this.targets = targets;
            this.map.reset();
            for(var i = targets.length - 1; i >= 0; i--){
                var target = targets[i];
                this.map.add(target.x, target.y, target);
            }
        }
1104996
function determineTargetDir(source, target) {
	return stat(source).
		then(results => results.isDirectory() ? target : path.dirname(target));
}
808759
def _is_in_targets(self, site, targets):
        
        elems = self._get_elements(site)
        for elem in elems:
            if elem not in targets:
                return False
        return True
530016
public static boolean contains(String target, String... containWith) {
		return contains(target, Arrays.asList(containWith));
	}
1049463
function (items) {
                var
                    idx;
                idx = items.length;
                while (idx--) {
                    if (0 !== items[idx].min()) {
                        ++idx;
                        break;
                    }
                }
                return idx;
            }