extend (props, classProps) {
    const superClass = this
    let subClass

    props || (props = {})
    classProps || (classProps = {})

    if (Object.hasOwnProperty.call(props, 'constructor')) {
      subClass = props.constructor
      delete props.constructor
    } else {
      subClass = function (...args) {
        utils.classCallCheck(this, subClass)
        superClass.apply(this, args)
      }
    }

    // Setup inheritance of instance members
    subClass.prototype = Object.create(superClass && superClass.prototype, {
      constructor: {
        configurable: true,
        enumerable: false,
        value: subClass,
        writable: true
      }
    })

    const obj = Object
    // Setup inheritance of static members
    if (obj.setPrototypeOf) {
      obj.setPrototypeOf(subClass, superClass)
    } else if (classProps.strictEs6Class) {
      subClass.__proto__ = superClass // eslint-disable-line
    } else {
      utils.forOwn(superClass, function (value, key) {
        subClass[key] = value
      })
    }
    if (!Object.hasOwnProperty.call(subClass, '__super__')) {
      Object.defineProperty(subClass, '__super__', {
        configurable: true,
        value: superClass
      })
    }

    utils.addHiddenPropsToTarget(subClass.prototype, props)
    utils.fillIn(subClass, classProps)

    return subClass
  }
Used for sublcassing. Invoke this method in the context of a superclass to
to produce a subclass based on `props` and `classProps`.

@example
import { utils } from 'js-data';
function Animal () {}
Animal.extend = utils.extend;
const Cat = Animal.extend({
  say () {
    console.log('meow');
  }
});
const cat = new Cat();
cat instanceof Animal; // true
cat instanceof Cat; // true
cat.say(); // "meow"

@method utils.extend
@param {object} props Instance properties for the subclass.
@param {object} [props.constructor] Provide a custom constructor function
to use as the subclass.
@param {object} props Static properties for the subclass.
@returns {Constructor} A new subclass.
@since 3.0.0