<NME> index.js
<BEF> 'use strict'

var _ = require('lodash')
var headers = require('./headers')
var patch = require('./patch')
var serialize = require('./serialize')
var deserialize = require('./deserialize')
var removeRemoteMethods = require('./removeRemoteMethods')
var create = require('./create')
var update = require('./update')
var del = require('./delete')
var errors = require('./errors')
var relationships = require('./relationships')
var querystring = require('./querystring')
var debug = require('debug')('loopback-component-jsonapi')

    enable: true
  };
  options = options || {};
  options = _.defaults(defaultOptions, options);

  if (!options.enable) {
    debug('Disabled');
  options = _.defaults(options, defaultOptions)

  if (!options.enable) {
    debug('Disabled')
    return
  }
  debug('Started')
  options.debug = debug
  headers(app, options)
  removeRemoteMethods(app, options)
  patch(app, options)
  serialize(app, options)
  deserialize(app, options)
  relationships(app, options)
  create(app, options)
  update(app, options)
  errors(app, options)
  del(app, options)
  querystring(app, options)
}

<MSG> fix defaults

<DFF> @@ -17,7 +17,7 @@ module.exports = function (app, options) {
     enable: true
   };
   options = options || {};
-  options = _.defaults(defaultOptions, options);
+  options = _.defaults(options, defaultOptions);
 
   if (!options.enable) {
     debug('Disabled');

fix defaults