Module
Data.StrMap
- Package
- purescript-mapsDEPRECATED
- Repository
- purescript/purescript-maps
This module defines a type of native Javascript maps which require the keys to be strings.
To maximize performance, Javascript objects are not wrapped, and some native code is used even when it's not necessary.
#StrMap Source
#fromFoldable Source
fromFoldable :: forall a f. Foldable f => f (Tuple String a) -> StrMap a
Create a map from a foldable collection of key/value pairs
#fromFoldableWith Source
fromFoldableWith :: forall a f. Foldable f => (a -> a -> a) -> f (Tuple String a) -> StrMap a
Create a map from a foldable collection of key/value pairs, using the specified function to combine values for duplicate keys.
#toUnfoldable Source
toUnfoldable :: forall a f. Unfoldable f => StrMap a -> f (Tuple String a)
Unfolds a map into a list of key/value pairs
#toAscUnfoldable Source
toAscUnfoldable :: forall a f. Unfoldable f => StrMap a -> f (Tuple String a)
Unfolds a map into a list of key/value pairs which is guaranteed to be sorted by key
#mapWithKey Source
mapWithKey :: forall b a. (String -> a -> b) -> StrMap a -> StrMap b
Apply a function of two arguments to each key/value pair, producing a new map
#filterWithKey Source
filterWithKey :: forall a. (String -> a -> Boolean) -> StrMap a -> StrMap a
Filter out those key/value pairs of a map for which a predicate fails to hold.