Sha256: 79eb7dbf67117f1ce8ca9406c5f7670b1b93ad1eca7bde8e36893d79065a913b

Contents?: true

Size: 470 Bytes

Versions: 6

Compression:

Stored size: 470 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}
 */
@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

6 entries across 6 versions & 1 rubygems

Version Path
flint-gs-2.0.2 stylesheets/flint/functions/lib/_exists.scss
flint-gs-2.0.1 stylesheets/flint/functions/lib/_exists.scss
flint-gs-2.0.0 stylesheets/flint/functions/lib/_exists.scss
flint-gs-2.0.0.rc.4 stylesheets/flint/functions/lib/_exists.scss
flint-gs-2.0.0.rc.3 stylesheets/flint/functions/lib/_exists.scss
flint-gs-2.0.0.rc.2 stylesheets/flint/functions/lib/_exists.scss