How to use the ember-data-model-fragments.default function in ember-data-model-fragments

To help you get started, we’ve selected a few ember-data-model-fragments examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github danielspaniel / ember-data-factory-guy / addon / factory-guy.js View on Github external
import { isPresent, typeOf } from '@ember/utils';
import { assign } from '@ember/polyfills';
import { join } from '@ember/runloop';
import { A } from '@ember/array';
import require from 'require';
import DS from 'ember-data';
import ModelDefinition from './model-definition';
import FixtureBuilderFactory from './builder/fixture-builder-factory';
import RequestManager from './mocks/request-manager';

let modelDefinitions = {};

let Fragment;
try {
  let MF = require('ember-data-model-fragments');
  Fragment = MF && MF.default.Fragment;
} catch (e) {
  // do nothing
}


class FactoryGuy {
  /**
   * Setting for FactoryGuy.
   *
   * responseTime: 0 is fastest
   * logLevel: 0 is off, 1 is on
   *
   * @param logLevel [0/1]
   */
  settings({logLevel = 0, responseTime = null} = {}) {
    RequestManager.settings({responseTime});