Home > rc-js-util > _Map
Utilities that apply to Map
.
Signature:
export declare class _Map
Property | Modifiers | Type | Description |
---|---|---|---|
addToSet | static |
typeof mapAddToSet | Used with maps that store sets. Where a set exists for a given key the value will be added to that set, otherwise a new set will be created containing the value. |
arrayMap | static |
typeof mapArrayMap | Like Array.map but with a Map input. Outputs an Array . |
clearingDeleteFromSet | static |
typeof mapClearingDeleteFromSet | Used with maps that store sets. Where a set exists for a given key the value will be removed from that set, if it is empty after removal, then the set is deleted. |
concat | static |
typeof mapConcat | Used with maps that store arrays. Where an array exists for a given key the values will be appended to that array, otherwise a copy of values array will be inserted. |
deleteFromSet | static |
typeof mapDeleteFromSet | Used with maps that store sets. Where a set exists for a given key the value will be removed from that set. |
deleteGet | static |
typeof mapDeleteGet | Get the stored value if present, then delete the key. |
entriesToArray | static |
typeof mapEntriesToArray | Converts a Map into an Array of its key value pairs. |
firstKey | static |
typeof mapFirstKey | Gets the first inserted key in a Map . |
firstValue | static |
typeof mapFirstValue | Gets the first inserted value in a Map . |
initializeGet | static |
typeof mapInitializeGet | Gets the value from a Map for a given key, where the value is undefined or hasn’t been set, the callback’s return will be inserted into the Map and returned. |
intersect | static |
typeof mapIntersect | <p>Does not check value equality, only key. Takes items from A.</p><p>See mapIntersect().</p> |
keysToArray | static |
typeof mapKeysToArray | Converts a Map into an Array of its keys. |
push | static |
typeof mapPush | Used with maps that store arrays. Where an array exists for a given key the value will be appended to that array, otherwise a new array will be created containing the value. |
removeManyFromArray | static |
typeof mapRemoveManyFromArray | Used with maps that store sets. Where a set exists for a given key the value will be added to that set, otherwise a new set will be created containing the value. |
removeOneFromArray | static |
typeof mapRemoveOneFromArray | Used with maps that store arrays. Where an array exists for a given key the value will be removed from that array. |
reportingAddToSet | static |
typeof mapReportingAddToSet | Used with maps that store sets. Where a set exists for a given key the value will be added to that set, otherwise a new set will be created containing the value. |
setDifference | static |
typeof mapSetDifference | returns items in A not in B. |
symmetricDifference | static |
typeof mapSymmetricDifference | Returns a map with keys in A not in B, and keys in B not in A. |
union | static |
typeof mapUnion | Returns a map with keys from both A and B. If both A and B have the same key the value from B will be used. |
valuesToArray | static |
typeof mapValuesToArray | Converts a Map into an Array of its values. |