<commit_before>import Ember from 'ember';

const emberMajorMinorVersion = Ember.VERSION.match(/(\d+\.\d+)\.*/)[1];
const isGlimmer = Number(emberMajorMinorVersion) >= 2.10;

let getMutValue;

if (isGlimmer) {
  const { MUTABLE_CELL } = Ember.__loader.require('ember-views/compat/attrs');
  getMutValue = (value) => {
    if (value && value[MUTABLE_CELL]) {
      return value.value;
    } else {
      return value;
    }
  };
} else {
  getMutValue = Ember.__loader.require('ember-glimmer/hooks/get-value')['default'];
}

export default function getMutableAttributes(attrs) {
  return Object.keys(attrs).reduce((acc, attr) => {
    acc[attr] = getMutValue(attrs[attr]);
    return acc;
  }, {});
}<commit_msg>Fix broken `get-mutable-attributes`.<commit_after>import Ember from 'ember';

const emberMajorMinorVersion = Ember.VERSION.match(/(\d+\.\d+)\.*/)[1];
const isGlimmer = Number(emberMajorMinorVersion) >= 2.10;

let getMutValue;

if (isGlimmer) {
  const { MUTABLE_CELL } = Ember.__loader.require('ember-views/compat/attrs');
  getMutValue = (value) => {
    if (value && value[MUTABLE_CELL]) {
      return value.value;
    } else {
      return value;
    }
  };
} else {
  getMutValue = Ember.__loader.require('ember-htmlbars/hooks/get-value')['default'];
}

export default function getMutableAttributes(attrs) {
  return Object.keys(attrs).reduce((acc, attr) => {
    acc[attr] = getMutValue(attrs[attr]);
    return acc;
  }, {});
}
{'fraction_non_alphanumeric': 0.17105263157894737, 'fraction_numerical': 0.00554016620498615, 'mean_word_length': 4.017361111111111, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, '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': '1770348', 'n_tokens_mistral': 513, 'n_tokens_neox': 505, 'n_words': 86}