map.deep-merge-key()
The map.deep-merge-key() function merges $map with retrieved values from $keys of this $map. The properties under $keys are removed.
// Sass.
@use 'sass:map';
// Functions.
@use 'map.get.function' as *;
// The `map.deep-merge-key()` function.
@function deep-merge-key($map, $keys...) {
@each $key in $keys {
$map: map.deep-remove(map.deep-merge($map, get($map, $key, ())), $key...);
}
@return $map;
}https://github.com/angular-package/sass/blob/main/map/_map.deep-merge-key.function.scss
Parameters
$map
$mapA map to merge with retrieved values from $keys of this map.
$keys...
$keys...The keys to get the values to merge with $map.
Return
The return value is a map merged with the values retrieved from $keys.
Examples
Last updated
Was this helpful?