Sha256: 06a99acc8a364ad96626a4433b5f627d7e136c3ab85cfba1af47d2e537a3dda5

Contents?: true

Size: 517 Bytes

Versions: 10

Compression:

Stored size: 517 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

10 entries across 10 versions & 1 rubygems

Version Path
flint-gs-1.0.3 stylesheets/flint/functions/lib/_exists.scss
flint-gs-1.0.2 stylesheets/flint/functions/lib/_exists.scss
flint-gs-1.0.1 stylesheets/flint/functions/lib/_exists.scss
flint-gs-1.0.0 stylesheets/flint/functions/lib/_exists.scss
flint-gs-0.1.7 stylesheets/flint/functions/lib/_exists.scss
flint-gs-0.1.6 stylesheets/flint/functions/lib/_exists.scss
flint-gs-0.1.5 sass/flint/functions/lib/_exists.scss
flint-gs-0.1.4 sass/flint/functions/lib/_exists.scss
flint-gs-0.1.3 sass/flint/functions/lib/_exists.scss
flint-gs-0.1.2 sass/flint/functions/lib/_exists.scss