MCPcopy Create free account
hub / github.com/Wscats/vscode-explore / cmp

Method cmp

contextKeyExpr/src/contextkey.ts:853–872  ·  view source on GitHub ↗
(other: ContextKeyExpression)

Source from the content-addressed store, hash-verified

851 }
852
853 public cmp(other: ContextKeyExpression): number {
854 if (other.type !== this.type) {
855 return this.type - other.type;
856 }
857 if (this.key < other.key) {
858 return -1;
859 }
860 if (this.key > other.key) {
861 return 1;
862 }
863 const thisSource = this.regexp ? this.regexp.source : '';
864 const otherSource = other.regexp ? other.regexp.source : '';
865 if (thisSource < otherSource) {
866 return -1;
867 }
868 if (thisSource > otherSource) {
869 return 1;
870 }
871 return 0;
872 }
873
874 public equals(other: ContextKeyExpression): boolean {
875 if (other.type === this.type) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected