Determine if item in mapping array is a valid "mixed" type value

Must be an object with properties "key" (of type string)
and "value" (of any type)

@api private
@param {*} item
@return {Boolean}
168737
function isMixed(item) {
  if (!is.object(item)) return false;
  if (!is.string(item.key)) return false;
  if (!has.call(item, 'value')) return false;
  return true;
}
1008950
function(arr, property, value) {
      return _.reject(arr, function(item) {
        return (item[property] === value);
      });
    }
648496
function is(obj, type) {
      if (!type) {
        return obj !== undefined;
      }

      if (type == 'array' && Arr.isArray(obj)) {
        return true;
      }

      return typeof obj == type;
    }
4756
function validateArrayTypeItemsExistence (api, response, schema, path) {
  if (schema.type === 'array' && _.isUndefined(schema.items)) {
    response.errors.push({
      code: 'OBJECT_MISSING_REQUIRED_PROPERTY',
      message: 'Missing required property: items',
      path: path
    });
  }
}
960781
function(items, propertyName) {
        if(!items) return false;

        var maxProperty;
        for(var i = 0; i < items.length; i++) {
            if(maxProperty == undefined)
                maxProperty = items[i][propertyName];
            else if(items[i][propertyName] > maxProperty)
                maxProperty = items[i][propertyName];
        }
        return maxProperty;
    }
557957
function isKey(value, object) {
        if (isArray(value)) {
            return false;
        }
        var type = typeof value;
        if (
            type == "number" ||
            type == "symbol" ||
            type == "boolean" ||
            value == null ||
            isSymbol(value)
        ) {
            return true;
        }
        return (
            reIsPlainProp.test(value) ||
            !reIsDeepProp.test(value) ||
            (object != null && value in Object(object))
        );
    }
1021893
function validatePropertyType(property, type, recursive) {
    return type && (
        (recursive && typeof property === 'object') ||
        (type === 'string' && typeof property === 'string') ||
        (type === 'number' && typeof property === 'number') ||
        (type === 'uuid' && isUuid(property)) ||
        (type === 'uuidList' && isUuidList(property))
    );
}
338919
function validate(key, values) {
  var typedef, value;

  if(!~Keys.indexOf(key)) {
    throw new Error('unknown configuration key: ' + key);
  }

  // retrieve the type definition
  typedef = Types[key];

  // validate on the typedef
  try {
    value = typedef.validate(key, values);
  }catch(e) {
    // got a more specific error message to throw
    if(typeof validator[key] === 'object'
      && validator[key].error) {
      throw validator[key].error;
    }
    throw e;
  }

  return value;
}
839817
function ( object ) {
      this.__class__ = 'Unique';

      if ( 'object' === typeof object )
        this.key = object.key;

      this.validate = function ( array ) {
        var value, store = [];

        if ( !_isArray( array ) )
          throw new Violation( this, array, { value: Validator.errorCode.must_be_an_array } );

        for ( var i = 0; i < array.length; i++ ) {
          value = 'object' === typeof array[ i ] ? array[ i ][ this.key ] : array[ i ];

          if ( 'undefined' === typeof value )
            continue;

          if ( -1 !== store.indexOf( value ) )
            throw new Violation( this, array, { value: value } );

          store.push( value );
        }

        return true;
      };

      return this;
    }
929788
@Override
    public int getItemType(BaseCell item) {
        // if the item is a keyType, which means item.type is not the key
        int version = mViewManager != null ? mViewManager.getViewVersion(item.stringType) : 0;
        if (!TextUtils.isEmpty(item.typeKey)) {
            // we should use getTypeKey()
            String typeKey = item.typeKey + version;
            if (!mStrKeys.containsKey(typeKey)) {
                int newType = mTypeId.getAndIncrement();
                mStrKeys.put(typeKey, newType);
                mId2Types.put(newType, item.stringType);
            }

            return mStrKeys.get(typeKey).intValue();
        } else {
            // otherwise, use item.type as identity key
            // note, this now only be executed in MainThread, atomic not actually needed
            String stringType = item.stringType + version;
            if (!mStrKeys.containsKey(stringType)) {
                int newType = mTypeId.getAndIncrement();
                mStrKeys.put(stringType, newType);
                mId2Types.put(newType, item.stringType);
            }
            return mStrKeys.get(stringType).intValue();
        }
    }
956880
function isKey$1(value, object) {
  if (isArray$5(value)) {
    return false;
  }
  var type = typeof value;
  if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol(value)) {
    return true;
  }
  return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
}
1274412
function mapObjects(arr, idKey) {
  var r = {};
  var len = arr.length;

  for (var i = 0; i < len; i++) {
    var item = arr[i];
    var id = isFunction(idKey) ? idKey(item, i) : item[idKey];
    r[id] = item;
  }

  return r;
}
1366650
private Object itemValue(Object obj, Object item) throws Exception {
		// String value
		if (item instanceof String) {
			return item;
		}

		Element node = (Element) item;
		String tag = node.getTagName();
		// TODO: in case of jdk7 usage use swtich instead
		if ("Call".equals(tag)) {
			return call(obj, node);
		}
		if ("Get".equals(tag)) {
			return get(obj, node);
		}
		if ("New".equals(tag)) {
			return newObj(obj, node);
		}
		if ("Ref".equals(tag)) {
			return refObj(obj, node);
		}
		if ("Array".equals(tag)) {
			return newArray(obj, node);
		}
		if ("Map".equals(tag)) {
			return newMap(obj, node);
		}
		if ("Property".equals(tag)) {
			return propertyObj(obj, node);
		}

		if ("SystemProperty".equals(tag)) {
			String name = getAttribute(node, "name");
			String defaultValue = getAttribute(node, "default");
			return System.getProperty(name, defaultValue);
		}

		LOG.warn("Unknown value tag: {}", node);
		return null;
	}
837440
function baseHas(object, key) {
        // Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`,
        // that are composed entirely of index properties, return `false` for
        // `hasOwnProperty` checks of them.
        return hasOwnProperty.call(object, key) || typeof object == 'object' && key in object && getPrototypeOf(object) === null;
      }
193191
function areValidTemplateItems (template) {
  return template.every(item =>
    item != null &&
    typeof item === 'object' &&
    (item.hasOwnProperty('label') ||
     item.hasOwnProperty('role') ||
     item.type === 'separator'))
}
989268
function (val) {
      var valid = [
        'string',  'number', 'integer',
        'boolean', 'object', 'array',
        'null',    'any'
      ];

      valid = (Array.isArray(val) ? val : [val]).every(function (val) {
        return valid.indexOf(val) !== -1;
      });
      if (!valid) {
        throw new(TypeError)("invalid type.");
      }

      this.property.type = val;
      return this;
    }
567273
function _validateSerializedArray(collection) {
  if (!Array.isArray(collection)) {
    throw new TypeError(collection + ' is not an array.');
  }

  if (collection.length === 0) {
    throw new Error(collection + ' is empty.');
  }

  if (collection[0].hasOwnProperty('name')) {
    if (typeof collection[0].name !== 'string') {
      throw new TypeError(
        'Invalid value type passed for name of option ' +
          collection[0].name +
          '. Value should be string.'
      );
    }
  } else {
    throw new Error(collection[0] + 'does not contain name key.');
  }
}