@rimbu/commonComp<K>On this pageinterface Comp<K>An object providing methods to compare two values of type K.Companion namespace: CompType parametersNameDescriptionKthe value typeMethodscompareReturns 0 if given value1 and value2 are equal, a positive value is value1 is greater than value2, and a negative value otherwise.Definitioncompare(value1: K, value2: K): number;ParametersNameTypeDescriptionvalue1Kthe first value to comparevalue2Kthe seconds value to compareexampleconst c = Comp.numberComp()console.log(c.compare(5, 5))// => 0console.log(c.compare(3, 5))// => -2console.log(c.compare(5, 3))// => 2isComparableReturns true if this instance can compare given obj.DefinitionisComparable(obj: any): obj is K;ParametersNameTypeDescriptionobjanythe object to checkexampleconst c = Comp.numberComp()console.log(c.isComparable(5))// => trueconsole.log(c.isComparable('a'))// => false