// Check if key exists in map //-------------------------------------------------------------------------------- // @param $map [Map] : map that contains $value // @param $value [Map] : key to search for // ------------------------------------------------------------------------------- // @return [Boolean] @function exists($map, $value){ @if is-map($map) { @if map-has-key($map, $value) { @return true; } @each $key, $i in $map { @if exists($i, $value) { @return true; } } } @return false; }