Methods
The `Range` object methods
public static createFrom(): Range<number, number, Step>
Creates the Range instance from the given random numbers and the step.
public static createMaximum(): Maximum<Value>
Returns the Maximum instance of the given maximum value.
public static createMinimum(): Minimum<Value>
Returns the Minimum instance of the given minimum value.
public forEachStep(): this
Performs the specified action for each step in the maximum range of an Array.
public getCurrentRange(): Readonly<Array<number>> | undefined
Returns a range of numbers from minimum to the current value by the step of a specified Range object.
public getCurrentStep(): number | undefined Returns the step of the range value.
public getRange(): number[]
Returns range of numbers from minimum to the given value with the step of a specified Range object.
public getRangeOfStep(): Readonly<Array<number>> | undefined
Returns a range of numbers by the specified step from the minimum to the given step of a specified Range object.
public getValueOfStep(): number | undefined
Returns the range value of the given step.
public hasEvery(): boolean
Checks whether every value of the given values is in the range of a specified Range object.
public isBetween(): boolean
Checks whether range of the given min and max is between the range of a specified Range object.
public isBetweenEvery(): boolean
Checks whether the range of a specified Range object is between every range of the given ranges.
public isBetweenSome(): boolean
Checks whether the range of a specified Range object is between some given ranges.
public maxGreaterThan(): boolean
Checks whether the value is less than the maximum range of a specified Range object.
public maxLessThan(): boolean
Checks whether the value is greater than the maximum range of a specified Range object.
public minGreaterThan(): boolean
Checks whether the value is less than a minimum range of a specified Range object.
public minLessThan(): boolean
Checks whether the value is greater than the minimum range of a specified Range object.
public setValue(): this
Sets the range value between the minimum and maximum of a specified Range object.
public setValueToStep(): this
Sets the value of the specified Range object to the value of the given step.
public stepByStep(): this Performs a callback function with the ability to decide when to move to the next step of the range.
Last updated
Was this helpful?