Sha256: fa2eda42205f903d51e797596494903c132fa1d53de51b367e23e87b4470185a

Contents?: true

Size: 539 Bytes

Versions: 5

Compression:

Stored size: 539 Bytes

Contents

// Check if key exists in map
//--------------------------------------------------------------------------------
// @param $map [map] : map that contains $value
// @param $value [string] : key to search for
// -------------------------------------------------------------------------------
// @return [bool]

@function flint-exists($map, $value){

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

	@return false;
}

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
flint-gs-1.10.0 stylesheets/flint/functions/lib/_exists.scss
flint-gs-1.9.1 stylesheets/flint/functions/lib/_exists.scss
flint-gs-1.8.0 stylesheets/flint/functions/lib/_exists.scss
flint-gs-1.7.2 stylesheets/flint/functions/lib/_exists.scss
flint-gs-1.7.0 stylesheets/flint/functions/lib/_exists.scss