map.update()

The map.update() function allows to set multiple key-value sets in a $map.

// Functions.
@use 'map.set.function';

// The `map.update()` function.
@function update($map, $key-value, $allowed...) {
  @each $key, $value in $key-value {
    $map: map.set($map, $key, $value, $allowed...);
  }
  @return $map;
}
https://github.com/angular-package/sass/blob/main/map/_map.update.function.scss

Parameters

$map

A map to update by multiple sets $key-value.

$key-value

A map of (key: value) to update the $map.

$allowed...

Allowed value types and/or values to update $map.

Return

The return value is $map with updated multiple sets.

Examples

Last updated

Was this helpful?