getSuper (instance, isCtor) {
    const ctor = isCtor ? instance : instance.constructor
    if (Object.hasOwnProperty.call(ctor, '__super__')) {
      return ctor.__super__
    }
    return Object.getPrototypeOf(ctor) || ctor.__proto__ // eslint-disable-line
  }
Return the superclass for the given instance or subclass. If an instance is
provided, then finds the parent class of the instance's constructor.

@example
import { utils } from 'js-data';
// using ES2015 classes
class Foo {}
class Bar extends Foo {}
const barInstance = new Bar();
let baseType = utils.getSuper(barInstance);
console.log(Foo === baseType); // true

// using Function constructor with utils.extend
function Foo () {}
Foo.extend = utils.extend;
const Bar = Foo.extend();
const barInstance = new Bar();
let baseType = utils.getSuper(barInstance);
console.log(Foo === baseType); // true

@method utils.getSuper
@param {Object|Function} instance Instance or constructor.
@param {boolean} [isCtor=false] Whether `instance` is a constructor.
@returns {Constructor} The superclass (grandparent constructor).
@since 3.0.0