Safe way of detecting whether or not the given thing is a primitive and
whether it has the given property
16460
function primitiveHasOwnProperty (primitive, propName) {  
    return (
      primitive != null
      && typeof primitive !== 'object'
      && primitive.hasOwnProperty
      && primitive.hasOwnProperty(propName)
    );
  }
511140
function isKey(value, object) {
  if (isArray_1(value)) {
    return false;
  }
  var type = typeof value;
  if (type == 'number' || type == 'symbol' || type == 'boolean' ||
      value == null || isSymbol_1(value)) {
    return true;
  }
  return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
    (object != null && value in Object(object));
}
813386
function isPrimitive(value) {
  if (value === null) {
    return true
  }
  if (value === undefined) {
    return false
  }
  if (typeof value === 'function') {
    return false
  }
  if ([ 'boolean', 'number', 'string' ].indexOf(typeof value) !== -1) {
    return true
  }
  if (value instanceof Date || value instanceof ArrayBuffer) {
    return true
  }
  return false
}
344391
function has(o, property) {
    if (arguments.length !== 2) {
      throw new Error('Expected two arguments to check.has, got only ' + arguments.length);
    }
    return Boolean(o && property &&
      typeof property === 'string' &&
      typeof o[property] !== 'undefined');
  }
85344
function isSafeProperty (object, prop) {
  if (!object || typeof object !== 'object') {
    return false
  }
  // SAFE: whitelisted
  // e.g length
  if (hasOwnProperty(safeNativeProperties, prop)) {
    return true
  }
  // UNSAFE: inherited from Object prototype
  // e.g constructor
  if (prop in Object.prototype) {
    // 'in' is used instead of hasOwnProperty for nodejs v0.10
    // which is inconsistent on root prototypes. It is safe
    // here because Object.prototype is a root object
    return false
  }
  // UNSAFE: inherited from Function prototype
  // e.g call, apply
  if (prop in Function.prototype) {
    // 'in' is used instead of hasOwnProperty for nodejs v0.10
    // which is inconsistent on root prototypes. It is safe
    // here because Function.prototype is a root object
    return false
  }
  return true
}
125170
def isseq(obj):
  '''
  
  '''
  return \
    not isstr(obj) \
    and not isdict(obj) \
    and ( isinstance(obj, (list, tuple)) \
          or callable(getattr(obj, '__iter__', None)))
959109
def check_property(prop, name, **kwargs):
    

    checkers = {
        'color': check_color,
        'alpha': check_alpha,
        'size': check_size,
        'thickness': check_thickness,
        'index': check_index,
        'coordinates': check_coordinates,
        'colormap': check_colormap,
        'bins': check_bins,
        'spec': check_spec
    }

    if name in checkers:
        return checkers[name](prop, **kwargs)
    elif isinstance(prop, list) or isinstance(prop, ndarray) or isscalar(prop):
        return check_1d(prop, name)
    else:
        return prop
644932
function(not, primitive){
        return set.isEqual( !not.value, primitive ) ? primitive: set.EMPTY;
    }
1285639
def is_numeric(property_name, *, numtype="float", min=None, max=None,
                 present_optional=False, message=None):
    """"""
    if numtype == "int":
      cast = util.try_parse_int
    elif numtype == "decimal":
      cast = util.try_parse_decimal
    elif numtype == "float":
      cast = util.try_parse_float
    else:
      raise ValueError("numtype argument must be one of: int, decimal, float")

    def check(val):
      """Checks that a value can be parsed as a number."""
      if val is None:
        return present_optional
      else:
        is_num, new_val = cast(val)
        if not is_num:
          return False
        else:
          if min is not None and new_val < min:
            return False
          if max is not None and new_val > max:
            return False
          return True

    if not message:
      msg = ["must be a"]
      if numtype == "int":
        msg.append("whole number")
      else:
        msg.append("number")
      if min is not None and max is not None:
        msg.append("between {0} and {1}".format(min, max))
      elif min is not None:
        msg.append("greater than or equal to {0}".format(min))
      elif max is not None:
        msg.append("less than or equal to {0}".format(max))
      message = " ".join(msg)

    return Validation(check, property_name, message)
1349769
function checkProperty(i) {
  const start = i;
  let l;

  if (l = checkProperty1(i)) tokens[start].propertyType = 1;
  else if (l = checkProperty2(i)) tokens[start].propertyType = 2;
  else if (l = checkProperty3(i)) tokens[start].propertyType = 3;

  return l;
}
478764
def is_visit_primitive(obj):
    ''''''
    from .base import visit
    if (isinstance(obj, tuple(PRIMITIVE_TYPES)) and not isinstance(obj, STR)
        and not isinstance(obj, bytes)):
        return True
    if (isinstance(obj, CONTAINERS) and not isinstance(obj, STR) and not
        isinstance(obj, bytes)):
        return False
    if isinstance(obj, STR) or isinstance(obj, bytes):
        if len(obj) == 1:
            return True
        return False
    return list(visit(obj, max_enum=2)) == [obj]
1125596
public final static boolean isPrimitive(Object object) {
        if (object instanceof String || object instanceof Number || object instanceof Boolean
                || object instanceof Character) {
            return true;
        }
        return false;
    }
171784
function is(type, input) {
  if (type === 'Object') return Object(input) === input;
  return toString.call(input) === '[object ' + type + ']';
}
1171951
function isKeyable(value) {
        var type = typeof value;
        return type == 'number' || type == 'boolean' || type == 'string' && value != '__proto__' || value == null;
      }
117903
function checkProperty1(i) {
  const start = i;
  let l;

  if (i >= tokensLength) return 0;

  if (l = checkIdent(i)) i += l;
  else return 0;

  return i - start;
}
1078917
public static boolean isPrimitive(Object object) {
    if (object == null) {
      return false;
    }

    Class<?> type = object.getClass();

    return object instanceof String || (object instanceof Integer || Integer.TYPE.equals(type))
        || (object instanceof Boolean || Boolean.TYPE.equals(type))
        || (object instanceof Long || Long.TYPE.equals(type)) || (object instanceof Double || Double.TYPE.equals(type))
        || (object instanceof Float || Float.TYPE.equals(type)) || (object instanceof Byte || Byte.TYPE.equals(type))
        || (object instanceof Short || Short.TYPE.equals(type))
        || (object instanceof Character || Character.TYPE.equals(type));
  }
1304202
function (v, p) {
      if (typeof v !== 'object')
        return true;
      var count = 0;
      for (var attr in v) if (v.hasOwnProperty(attr)) count = count + 1;
      return count >= p;
    }