import { underscore } from 'ember-string';
import JSONAPISerializer from 'ember-data/serializers/json-api';

export default JSONAPISerializer.extend({
  isNewSerializerAPI: true,

  keyForAttribute(attr) {
    return this.get(`attrs.${attr}`) || underscore(attr);
  }
});
