> For the complete documentation index, see [llms.txt](https://spectrecss.angular-package.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://spectrecss.angular-package.dev/function/map-get-default.md).

# map-get-default()

{% code title="" lineNumbers="true" %}

```scss
@function map-get-default($map, $key, $default-value: null) {
  @if map.has-key($map, $key) {
    @return map.get($map, $key);
  }
  @return $default-value;
}
```

{% endcode %}
