Sha256: 14e53f550bbb9edec76cef9bcff0553991107dd9f172575fa00bde5685077f06

Contents?: true

Size: 512 Bytes

Versions: 7

Compression:

Stored size: 512 Bytes

Contents

///
/// Check if key exists in map
///
/// @access private
///
/// @param {Map}    $map   - map to search
/// @param {String} $value - key to search for
///
/// @return {Bool}
///
/// @group Internal Functions
///
@function flint-exists($map, $value){
	$is-map: flint-is-map($map);
	$top-has-key: $is-map and map-has-key($map, $value) or false;

	@if $top-has-key {
		@return true;
	} @else if $is-map {
		@each $m, $k in $map {
			@if flint-exists($k, $value) {
				@return true;
			}
		}
	}

	@return false;
}

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
flint-gs-2.1.4 stylesheets/flint/functions/lib/_exists.scss
flint-gs-2.1.3 stylesheets/flint/functions/lib/_exists.scss
flint-gs-2.1.2 stylesheets/flint/functions/lib/_exists.scss
flint-gs-2.1.1 stylesheets/flint/functions/lib/_exists.scss
flint-gs-2.1.0 stylesheets/flint/functions/lib/_exists.scss
flint-gs-2.0.9 stylesheets/flint/functions/lib/_exists.scss
flint-gs-2.0.8 stylesheets/flint/functions/lib/_exists.scss