@charset 'UTF-8';

////
/// Flavor SCSS Core
/// @group core
/// @author blackmirror1980
////

/// Checks if a value is null
///
/// @access public
/// @param {any} $n - the value to check
/// @return {boolean} - true if is null
@function is-null($n) {
  @return type-of($n)==null;
}

/// Checks if a value is defined
///
/// @access public
/// @param {any} $d - the value to check
/// @return {boolean} - true if is defined
@function is-defined($d) {
  @return $d and not is-null($d);
}

/// nth-value Helper function
/// <br>Return $default rather than throwing an error if index is not available in the list.
///
/// @param {array | list} $list - the haystack list to check
/// @param {integer} $index - the needle index
/// @param {any} $default [null] - the default value to fallback
/// @return {any} - the nth-value
@function nth-value($list, $index, $default: null) {
  @return if(length($list) >= $index, nth($list, $index), $default);
}

@import 'types/types';
@import 'mixins/mixins';
