<commit_before>////////////////////////
// Default the Breakpoints variable
////////////////////////
$breakpoints: () !default;

////////////////////////
// Respond-to API Mixin
////////////////////////

@mixin respond-to($context, $no-query: false) {
  @if type-of($breakpoints) != 'list' {
    // Just in case someone writes gibberish to the $breakpoints variable.
    @warn "Your breakpoints aren't a list! See https://github.com/snugug/respond-to#api if you'd like a reminder on how to use Respond-to";
  }
  @if length($breakpoints)  != 0 {
    // If there's only one breakpoint, SASS will think it's a space separated list :P
    @if length($breakpoints) == 2 and type-of(nth($breakpoints, 1)) != 'list' {
      $breakpoints: append((), (nth($breakpoints, 1), nth($breakpoints, 2)));
    }
    @each $bkpt in $breakpoints {
      @if $context == nth($bkpt, 1) {
        $length: length($bkpt);
        $mq: false !default;

        @for $i from 2 through $length {
          // If it's the first item, override $mq
          @if $i == 2 {
            $mq: nth($bkpt, $i);
          }
          // Else, join $mq
          @else {
            $mq: join($mq, nth($bkpt, $i));
          }
        }

        @include breakpoint($mq, $no-query) {
          @content;
        }
      }
    }
  }
  @else {
    @warn "You haven't created any breakpoints yet! Make some already! See https://github.com/snugug/respond-to#api if you'd like a reminder on how to use Respond-to";
    @content;
  }
}

//////////////////////////////
// Add Breakpoint to Breakpoints
//////////////////////////////
@function add-breakpoint($name, $bkpt) {
  $bkpt: $name $bkpt;
  $output: append($breakpoints, $bkpt, 'comma');
  @return $output;
}<commit_msg>Rewrite respond-to to use maps<commit_after>////////////////////////
// Default the Breakpoints variable
////////////////////////
$breakpoints: () !default;

////////////////////////
// Respond-to API Mixin
////////////////////////
@mixin respond-to($context, $no-query: false) {
  @if type-of($breakpoints) != 'map' {
    // Just in case someone writes gibberish to the $breakpoints variable.
    @warn "Your breakpoints aren't a map! See https://github.com/snugug/respond-to#api if you'd like a reminder on how to use Respond-to";
    @content;
  }
  @else if map-has-key($breakpoints, $context) {
    @include breakpoint(map-get($breakpoints, $context), $no-query) {
      @content;
    }
  }
  @else if not map-has-key($breakpoints, $context) {
    @warn "`#{$context}` isn't a defined breakpoint! Please add it using `$breakpoints: add-breakpoint(`#{$context}`, $value);`";
    @content;
  }
  @else {
    @warn "You haven't created any breakpoints yet! Make some already! See https://github.com/snugug/respond-to#api if you'd like a reminder on how to use Respond-to";
    @content;
  }
}

//////////////////////////////
// Add Breakpoint to Breakpoints
//////////////////////////////
@function add-breakpoint($name, $bkpt, $overwrite: false) {
  $output: ($name: $bkpt);
  @if length($breakpoints) == 0 {
    @return $output;
  }
  @else {
    @if map-has-key($breakpoints, $name) and $overwrite != true {
      @warn "You already have a breakpoint named `#{$name}`, please choose another breakpoint name, or pass in `$overwrite: true` to overwrite the previous breakpoint.";
      @return $breakpoints;
    }
    @else if not map-has-key($breakpoints, $name) or $overwrite == true {
      @return map-merge($breakpoints, $output);
    }
  }
}
{'fraction_non_alphanumeric': 0.2261119081779053, 'fraction_numerical': 0.002582496413199426, 'mean_word_length': 2.1208594449418086, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4900870', 'n_tokens_mistral': 1103, 'n_tokens_neox': 1052, 'n_words': 321}