Docs (v5)
  • v5
  • v4.3.7
  • v3.8.2
PlaygroundBrowser extensionQuestionsGitHub

Immutable.js

List
Map
OrderedMap
Set
OrderedSet
Stack
Range()
Repeat()
Record
Record.Factory
Seq
Seq.Keyed
Seq.Indexed
Seq.Set
Collection
Collection.Keyed
Collection.Indexed
Collection.Set
ValueObject
OrderedCollection
fromJS()
is()
hash()
isImmutable()
isCollection()
isKeyed()
isIndexed()
isAssociative()
isOrdered()
isValueObject()
isSeq()
isList()
isMap()
isOrderedMap()
isStack()
isSet()
isOrderedSet()
isRecord()
get()
has()
remove()
set()
update()
getIn()
hasIn()
removeIn()
setIn()
updateIn()
merge()
mergeWith()
mergeDeep()
mergeDeepWith()

has()

Returns true if the key is defined in the provided collection.

Method signature

has(collection, key): boolean;

A functional alternative to collection.has(key) which will also work with plain Objects and Arrays as an alternative for collection.hasOwnProperty(key).

;