@robbiemu/handy-typescript / Modules / Entry
Description
helper methods for working with entries
• new Entry()
▸ Static
keyOf<K
, V
>(entry
): K
Static
Method
keyOf the key of an entry
Name |
---|
K |
V |
Name | Type |
---|---|
entry |
FixedSizeArray <2 , K & V , "0" > |
K
the key
▸ Static
maxKey<K
, V
>(transformer?
): [Reducer
<K
>, null
]
Static
Method
maxKey
Name |
---|
K |
V |
Name | Type | Description |
---|---|---|
transformer? |
Function |
a helper function to traverse entries to comparing which is max, by default by comparing the keys |
[Reducer
<K
>, null
]
helper args to the reduce function which produces the max key according to the greater-than operator on the transformed entry
▸ Static
maxKeys<K
, V
>(transformer?
): [Reducer
<K
>, null
]
Static
Method
maxKeys
Name |
---|
K |
V |
Name | Type | Description |
---|---|---|
transformer? |
Function |
a helper function to traverse entries to comparing which is max, by default by comparing the keys |
[Reducer
<K
>, null
]
helper args to the reduce function which produces all maximal keys according to the greater-than operator on the transformed entry
▸ Static
valueOf<K
, V
>(entry
): V
Static
Method
valueOf the value of an entry
Name |
---|
K |
V |
Name | Type |
---|---|
entry |
FixedSizeArray <2 , K & V , "0" > |
V
the value