code: function createFactory(descriptor) {
    return function Stamp(options = {}, ...args) {
      // The 'methods' metadata object becomes the prototype for new object instances.
      const instance = Object.create(descriptor.methods || {});
  
      // Deep merge, then override with shallow merged properties, then apply property descriptors.
      merge(instance, descriptor.deepProperties);
      assign(instance, descriptor.properties);
      Object.defineProperties(instance, descriptor.propertyDescriptors || {});
  
      // Run initializers sequentially.
      return (descriptor.initializers || [])
        .filter(isFunction)
        .reduce((resultingInstance, initializer) => {
          // Invoke an initializer in the way specification tell us to.
          const returnedValue = initializer.call(
            // 'this' context will be the object instance itself
            resultingInstance,
            // the first argument passed from factory to initializer
            options,
            // special arguments. See specification.
            {instance: resultingInstance, stamp: Stamp, args: [options].concat(args)}
          );
  
          // Any initializer can override the object instance with basically anything.
          return returnedValue === undefined ? resultingInstance : returnedValue;
        }, instance);
    };
  }
docs: Creates new factory instance.
  @param {object} descriptor The information about the object the factory will be creating.
  @returns {Function} The new factory function.