code: function (value) {
          if (value === null || value === undefined || value === defaultComparer) {
              return defaultComparer;
          }
  
          else if (value instanceof Comparer) {
              return value;
          }
  
          else if (isFunction(value)) {
              return new Comparer(value);
          }
  
          else if (isFunction(value.compare)) {
              return new Comparer(value.compare);
          }
  
          else {
              return defaultComparer;
          }
      }
docs: Gets or creates a new Comparer object.
  @param {Comparer|Object} value A Comparer object.
  @returns {Comparer}