<commit_before>import Ember from 'ember';

const {
  get,
  String: {
    singularize
  },
  run
} = Ember;

const assign = Ember.assign || Ember.merge;

export function importData(store, content, options) {
  // merge defaults
  options = assign({
    json: true,
    truncate: true
  }, options || {});

  let reloadTypes = [];

  content = options.json ? JSON.parse(content) : content;

  if (options.truncate) {
    content.data.forEach((record) => {
      const type = record.type;<commit_msg>fix: #271 now import singularize from ember-inflector to remove deprecation warning in 2.16.2<commit_after>import Ember from 'ember';
import { singularize } from 'ember-inflector';

const {
  get,
  run
} = Ember;

const assign = Ember.assign || Ember.merge;

export function importData(store, content, options) {
  // merge defaults
  options = assign({
    json: true,
    truncate: true
  }, options || {});

  let reloadTypes = [];

  content = options.json ? JSON.parse(content) : content;

  if (options.truncate) {
    content.data.forEach((record) => {
      const type = record.type;
{'fraction_non_alphanumeric': 0.13302752293577982, 'fraction_numerical': 0.006422018348623854, 'mean_word_length': 3.3815261044176705, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2988318', 'n_tokens_mistral': 357, 'n_tokens_neox': 342, 'n_words': 93}