Class: Equal
Utility class for comparing equality of m2c2kit objects.
Constructors
new Equal()
new Equal():
Equal
Returns
Methods
rgbaColor()
static
rgbaColor(color1
?,color2
?):boolean
Compares two RgbaColor objects and returns true if they are equal.
Parameters
• color1?: RgbaColor
• color2?: RgbaColor
Returns
boolean
Remarks
If either of the colors is undefined, the comparison will return false. RgbaColor is an array of 4 numbers, and thus is a reference type. We need this method to compare two RgbaColor objects for value equality.
Defined in
Equal.ts:42
value()
static
value(value1
,value2
):boolean
Compares two values for deep equality.
Parameters
• value1: ValueType
value to compare
• value2: ValueType
value to compare
Returns
boolean
true if values have deep equality
Remarks
Supported values are string, number, boolean, null, undefined, and object (note that arrays are objects in JavaScript).
Defined in
Equal.ts:64