// Has determines whether or not a given object has a property with the given key
14217
func Has(in interface{}, key interface{}) bool {
	av := reflect.ValueOf(in)

	switch av.Kind() {
	case reflect.Map:
		kv := reflect.ValueOf(key)
		return av.MapIndex(kv).IsValid()
	case reflect.Slice, reflect.Array:
		l := av.Len()
		for i := 0; i < l; i++ {
			v := av.Index(i).Interface()
			if reflect.DeepEqual(v, key) {
				return true
			}
		}
	}

	return false
}
98211
func (s *Set) Has(x uint32) bool {
	v := s.sparse[x]
	return v < uint32(len(s.dense)) && s.dense[v] == x
}
1086832
func Has(obj interface{}, pointer string) (rv bool) {
	defer func() {
		if e := recover(); e != nil {
			rv = false
		}
	}()
	tokens, err := parse(pointer)
	if err != nil {
		return false
	}

	i := 0
	v := reflect.ValueOf(obj)
	if len(tokens) > 0 && tokens[0] != "" {
		for i < len(tokens) {
			for v.Kind() == reflect.Interface {
				v = v.Elem()
			}
			token := tokens[i]

			if n, err := strconv.Atoi(token); err == nil && isIndexed(v) {
				v = v.Index(n)
			} else {
				v = v.MapIndex(reflect.ValueOf(token))
			}
			i++
		}
		return v.IsValid()
	}
	return false
}
1369496
func (b *Box) Has(name string) bool {
	_, err := b.Find(name)
	return err == nil
}
823817
func (b *Builder) Has(name string) bool {
	if _, ok := b.t.cols[name]; ok {
		return true
	}
	if _, ok := b.t.consts[name]; ok {
		return true
	}
	return false
}
898779
func (rs *Set) Has(value string) (bool, error) {
	conn := rs.pool.Get(rs.dbindex)
	retval, err := conn.Do("SISMEMBER", rs.id, value)
	if err != nil {
		panic(err)
	}
	return redis.Bool(retval, err)
}
698234
func (deque *keyedDeque) HasKey(key interface{}) bool {
	_, ok := deque.Get(key)
	return ok
}
1285340
func (t *ImmutableTree) Has(key []byte) bool {
	if t.root == nil {
		return false
	}
	return t.root.has(t, key)
}
211696
func (t *Mutable) Has(key []byte) bool {
	if node, _ := t.get(key); node != nil {
		return true
	}
	return false
}
1075170
func (ls *LocalStore) Has(ctx context.Context, addr Address) bool {
	return ls.DbStore.Has(ctx, addr)
}
339141
func (p Protected) Has(key string) bool {
	_, ok := p[key]
	return ok
}
235854
func (db *CLevelDB) Has(key []byte) bool {
	return db.Get(key) != nil
}
585649
func (c *ServiceConfigs) Has(name string) bool {
	c.mu.RLock()
	defer c.mu.RUnlock()
	_, ok := c.m[name]
	return ok
}
1272036
func (params Params) Has(key string) bool {
	_, ok := params[key]
	return ok
}
878730
func (d *MutexDatastore) Has(key ds.Key) (exists bool, err error) {
	d.RLock()
	defer d.RUnlock()
	return d.child.Has(key)
}
1140519
func (t *table) Has(key []byte) (bool, error) {
	return t.db.Has(append([]byte(t.prefix), key...))
}
616239
func (h *Hasser) Has(addr chunk.Address) (bool, error) {
	return h.db.retrievalDataIndex.Has(addressToItem(addr))
}