// =============================================================================
// =ALEKSI - MAP-CLEAN
// =============================================================================
////
//// @group aleksi-maps
//// @author [Yoannis Jamar](https://yoannis.com)

@import "aleksi/maps/map-purge";

// =map-clean( $map )
// -----------------------------------------------------------------------------
/// Removes all falsy values from a map.
/// **Note**: if all items have been removed, it will return `()` to act like
/// all other map filtering functions (emptying a list with `map-remove()` would
/// normally return a *real* empty map ``);
///
/// @param {map} $map - The map to clean.
///
/// @return {map} - A new map, without falsy values.
/// @throw Error if `$map` is not a map.
///
/// @example scss
///   $foo: map-clean( ('a': 10, 'b': false, 'c': 'foo', 'd': null) );
///     // => ('a': 10, 'c': 'foo')
///
/// @access public
/// @since 0.1.0
///
/// @deprecated Use map-purge instead
/// @see {function} map-purge

@function map-clean( $map )
{
  $_: throw-warning('deprecated `map-clean()` function, use `map-purge()` instead');
  @return map-purge($map);
}