docs: function(options) {
        var comparator = this.comparator;
        if (!comparator) throw new Error('Cannot sort a set without a comparator');
        options || (options = {});
  
        var length = comparator.length;
        if (langx.isFunction(comparator)) comparator = langx.proxy(comparator, this);
  
        // Run sort based on type of `comparator`.
        if (length === 1 || langx.isString(comparator)) {
          this.entities = this.sortBy(comparator);
        } else {
          this.entities.sort(comparator);
        }
        if (!options.silent) this.trigger('sort', this, options);
        return this;
      }