get steps()

Retrieves the number of steps of the specified `Range` object

Range.prototype.steps

The get accessor retrieves the number of steps of the specified Range object.

range.class.ts
public get steps(): number {
  return this.getRange().length;
}

Type

Example usage

// Example usage.
import { Range } from '@angular-package/range';

// Create new instance.
// Returns Range {min: 3, max: 27, value: 10} of Range<3, 27, 3>.
const range = new Range(3, 27, 10, 3);

// Returns 9 of number type.
range.steps;

Last updated