Sha256: 739f1f1a0b34cc7e19c96990300475977f6347b4ab5178b1640b5122bfbc02d0

Contents?: true

Size: 522 Bytes

Versions: 14

Compression:

Stored size: 522 Bytes

Contents

// 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;
}

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
flint-gs-1.3.5 stylesheets/flint/functions/lib/_exists.scss
flint-gs-1.3.4 stylesheets/flint/functions/lib/_exists.scss
flint-gs-1.3.3 stylesheets/flint/functions/lib/_exists.scss
flint-gs-1.3.2 stylesheets/flint/functions/lib/_exists.scss
flint-gs-1.3.1 stylesheets/flint/functions/lib/_exists.scss
flint-gs-1.3.0 stylesheets/flint/functions/lib/_exists.scss
flint-gs-1.2.0 stylesheets/flint/functions/lib/_exists.scss
flint-gs-1.1.0 stylesheets/flint/functions/lib/_exists.scss
flint-gs-1.0.9 stylesheets/flint/functions/lib/_exists.scss
flint-gs-1.0.8 stylesheets/flint/functions/lib/_exists.scss
flint-gs-1.0.7 stylesheets/flint/functions/lib/_exists.scss
flint-gs-1.0.6 stylesheets/flint/functions/lib/_exists.scss
flint-gs-1.0.5 stylesheets/flint/functions/lib/_exists.scss
flint-gs-1.0.4 stylesheets/flint/functions/lib/_exists.scss