function _es5WrapClass(shim, Base, fnName, spec, args) {
  /**
   * Wraps the es5 class in a function
   *
   * @param {...any} cnstrctArgs
   * @returns {Function|undefined} a function if not already wrapped in WrappedClass
   */
  function WrappedClass(...cnstrctArgs) {
    if (!(this instanceof WrappedClass)) {
      // Some libraries support calling constructors without the `new` keyword.
      // In order to support this we must apply the super constructor if `this`
      // is not an instance of ourself. JavaScript really needs a better way
      // to generically apply constructors.
      cnstrctArgs.unshift(WrappedClass) // `unshift` === `push_front`
      return new (WrappedClass.bind.apply(WrappedClass, cnstrctArgs))()
    }

    // Assemble the arguments to hand to the spec.
    const _args = [shim, Base, fnName, cnstrctArgs]
    if (args.length > 0) {
      _args.push.apply(_args, args)
    }

    // Call the spec's before hook, then call the base constructor, then call
    // the spec's after hook.
    spec.pre && spec.pre.apply(null, _args)
    Base.apply(this, cnstrctArgs)
    spec.post && spec.post.apply(this, _args)
  }

  util.inherits(WrappedClass, Base)
  WrappedClass.prototype = Base.prototype

  return WrappedClass
}
Wraps an es5-style class using a subclass.

- `_es5WrapClass(shim, Base, fnName, spec, args)`

@private
@param {Shim} shim
 The shim performing the wrapping/binding.
@param {Function} Base
 The class to be wrapped.
@param {string} fnName
 The name of the base class.
@param {ClassWrapSpec} spec
 The spec with pre- and post-execution hooks to call.
@param {Array.<*>} args
 Extra arguments to pass through to the pre- and post-execution hooks.
@returns {Function} A class that extends Base with execution hooks.