code: function create(type, constructor) {
    return function scale() {
      var s = constructor();
  
      if (!s.invertRange) {
        s.invertRange = s.invert ? invertRange(s)
          : s.invertExtent ? invertRangeExtent(s)
          : undefined;
      }
  
      s.type = type;
      return s;
    };
  }
docs: Augment scales with their type and needed inverse methods.