Return an Array of all the entry values in the Collection
Then iterating over a Collection, we should iterate over its values instead of over its entries
Filter the Collection, returning an Array of entries which match a functional condition.
The functional condition to test.
An Array of matched values
Find an entry in the Map using a functional condition.
The functional condition to test.
The value, if found, otherwise undefined
Apply a function to each element of the collection
A function to apply to each element
Get an element from the Collection by its key.
The key of the entry to retrieve
Optionaloptions: { strict?: boolean } = {}Additional options that affect how entries are retrieved
Optionalstrict?: booleanThrow an Error if the requested key does not exist. Default false.
The retrieved entry value, if the key exists, otherwise undefined
Get an entry from the Collection by name. Use of this method assumes that the objects stored in the collection have a "name" attribute.
The name of the entry to retrieve
Optionaloptions: { strict?: boolean } = {}Additional options that affect how entries are retrieved
Optionalstrict?: booleanThrow an Error if the requested name does not exist. Default false.
The retrieved entry value, if one was found, otherwise undefined
Test whether a condition is met by some entry in the Collection.
The functional condition to test.
Was the test condition passed by at least one entry?
Convert the Collection to a primitive array of its contents.
An array of contained values
A reusable storage concept which blends the functionality of an Array with the efficient key-based lookup of a Map. This concept is reused throughout Foundry VTT where a collection of uniquely identified elements is required.
Template: K
Template: V