<commit_before>/* global requirejs */

import _find from 'lodash/find';

function _hasEmberData() {
  let matchRegex = /^ember-data/i;
  return !!_find(Object.keys(requirejs.entries), (e) => !!e.match(matchRegex));
}

export const hasEmberData = _hasEmberData();

export function isDsModel(m) {
  return m
         && m.isModel
         && typeof m.eachRelationship === 'function';
}<commit_msg>Remove isModel check as it was introduced in Ember Data 2.12+<commit_after>/* global requirejs */

import _find from 'lodash/find';

function _hasEmberData() {
  let matchRegex = /^ember-data/i;
  return !!_find(Object.keys(requirejs.entries), (e) => !!e.match(matchRegex));
}

export const hasEmberData = _hasEmberData();

export function isDsModel(m) {
  return m && typeof m.eachRelationship === 'function';
}
{'fraction_non_alphanumeric': 0.14745972738537794, 'fraction_numerical': 0.0037174721189591076, 'mean_word_length': 4.496598639455782, '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': '630123', 'n_tokens_mistral': 275, 'n_tokens_neox': 267, 'n_words': 67}