Comparator

No summary available

Import
the javascript logo
import { Comparator } from "@schukai/monster/source/util/comparator.mjs";
Source
the git logo
Package
the npm logo
Since
1.3.0

Simple Example

/** this example does not use an extra script **/

Exported

Comparator

Derived from

Base

Options

The Options listed in this section are defined directly within the class. This class is derived from several parent classes. Therefore, it inherits Options from these parent classes. If you cannot find a specific Options in this list, we recommend consulting the documentation of the Base.

Option
Type
Default
Description
-/-

Properties

The Properties listed in this section are defined directly within the class. This class is derived from several parent classes. Therefore, it inherits Properties from these parent classes. If you cannot find a specific Properties in this list, we recommend consulting the documentation of the Base.

Methods

The methods listed in this section are defined directly within the class. This class is derived from several parent classes. Therefore, it inherits methods from these parent classes. If you cannot find a specific method in this list, we recommend consulting the documentation of the Base.

Constructor

constructor([callback])
Parameters
  • [callback] {monster.util~examplecallback}: Comparator callback
create new comparator

Other methods

equal(a,b)
Parameters
  • a {*}: a
  • b {*}: b
Returns
  • {boolean}
Checks if two variables are equal.
greaterThan(a,b)
Parameters
  • a {*}: a
  • b {*}: b
Returns
  • {boolean}
Checks if variable a is greater than b
greaterThanOrEqual(a,b)
Parameters
  • a {*}: a
  • b {*}: b
Returns
  • {boolean}
Checks if variable a is greater than or equal to b
lessThan(a,b)
Parameters
  • a {*}: a
  • b {*}: b
Returns
  • {boolean}
Checks if variable a is less than b
lessThanOrEqual(a,b)
Parameters
  • a {*}: a
  • b {*}: b
Returns
  • {boolean}
Checks if variable a is less than or equal to b
reverse()
Returns
  • {Comparator}
changes the order of the operators

Events

This component does not fire any public events. It may fire events that are inherited from its parent classes.

The current width of the area is too small to display the content correctly.