Class Map
Hierarchy
- Map
Index
Constructors
constructor
Creates a new Sass map.
Parameters
length: number
The number of (initially undefined) key/value pairs in the map.
Returns Map
Methods
get Key
Returns the key in the key/value pair at
index
.Parameters
index: number
A (0-based) index of a key/value pair in this map.
Returns LegacyValue
get Length
Returns the number of key/value pairs in this map.
Returns number
get Value
Returns the value in the key/value pair at
index
.Parameters
index: number
A (0-based) index of a key/value pair in this map.
Returns LegacyValue
set Key
Sets the value in the key/value pair at
index
tovalue
.Parameters
index: number
A (0-based) index of a key/value pair in this map.
key: LegacyValue
Returns void
set Value
Sets the value in the key/value pair at
index
tovalue
.Parameters
index: number
A (0-based) index of a key/value pair in this map.
value: LegacyValue
Returns void
Sass's map type.
⚠️ Heads up!
This map type is represented as a list of key-value pairs rather than a mapping from keys to values. The only way to find the value associated with a given key is to iterate through the map checking for that key. Maps created through this API are still forbidden from having duplicate keys.