Sha256: fbc1f8cbd6f198c1f0d24826d62bfde3cb0d89582325d94263128228b15404d5

Contents?: true

Size: 613 Bytes

Versions: 4

Compression:

Stored size: 613 Bytes

Contents

/**
 * Fetch value from map
 *
 * @access private
 *
 * @param {Map}     $map  - map to fetch value from
 * @param {ArgList} $keys - list of keys to traverse
 *
 * @return {*}
 *
 * @group Internal Functions
 */
@function flint-map-fetch($map, $keys...) {

	// Use Ruby function if available
	@if $flint__use-ruby-functions {
		@return flint_ruby_map_fetch($map, $keys...);
	} @else {
		$result: $map;

		@each $key in $keys {
			@if $result {
				$result: flint-is-map($result) and map-has-key($result, $key) and map-get($result, $key) or false;
			} @else {
				@return false;
			}
		}

		@return $result;
	}
}

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
flint-gs-2.0.6 stylesheets/flint/functions/lib/_map-fetch.scss
flint-gs-2.0.5 stylesheets/flint/functions/lib/_map-fetch.scss
flint-gs-2.0.4 stylesheets/flint/functions/lib/_map-fetch.scss
flint-gs-2.0.3 stylesheets/flint/functions/lib/_map-fetch.scss