UNPKG

ember-m3

Version:

Alternative to @ember-data/model in which attributes and relationships are derived from API Payloads

11 lines (8 loc) 321 B
import { CUSTOM_MODEL_CLASS } from 'ember-m3/-infra/features'; export function recordDataFor(recordOrInternalModel) { if (CUSTOM_MODEL_CLASS) { return recordOrInternalModel._recordData; } let internalModel = recordOrInternalModel._internalModel || recordOrInternalModel; return internalModel._recordData; }