UNPKG

@typescript-package/range

Version:

A lightweight TypeScript library for managing various types of ranges.

1 lines 55.4 kB
{"version":3,"file":"typescript-package-range.mjs","sources":["../../../package/range/src/lib/greater.class.ts","../../../package/range/src/lib/less.class.ts","../../../package/range/src/lib/inequality.class.ts","../../../package/range/src/lib/maximum.class.ts","../../../package/range/src/lib/minimum.class.ts","../../../package/range/src/lib/number.class.ts","../../../package/range/src/lib/range.class.ts","../../../package/range/src/public-api.ts","../../../package/range/src/typescript-package-range.ts"],"sourcesContent":["/**\n * The `Greater` primitive wrapper `object` represents the primitive value of the `number` type greater than the given.\n */\nexport class Greater<Value extends number> extends Number {\n /**\n * The `get` accessor, with the help of `toStringTag`, changes the default tag to `'Greater'` for an instance of `Greater`. It can be read\n * by the `typeOf()` function of `@angular-package/type`.\n * @returns The return value is the word 'Greater` of a `string`.\n */\n public get [Symbol.toStringTag](): string {\n return 'Greater';\n }\n\n //#region static public methods.\n /**\n * Creates the `Greater` instance with the given primitive `value`.\n * @param value The value of generic type variable `Value` to set with a newly created instance.\n * @returns The return value is the `Greater` instance with the primitive value of the given `value`.\n */\n public static create<Value extends number>(value: Value): Greater<Value> {\n return new this(value);\n }\n\n /**\n * Checks whether the given `value` is the `Greater` instance of any or given primitive value.\n * @param value The value of any type to test against the `Greater` instance.\n * @param greaterValue An optional value of generic type variable `Value` to check whether it's the primitive value of the given `value`.\n * @returns The return value is a `boolean` indicating whether the given `value` is the `Greater` instance of any or given primitive\n * value.\n */\npublic static isGreater<Value extends number>(\n value: any,\n greaterValue?: Value\n): value is Greater<Value> {\n return (\n typeof value === 'object' &&\n value instanceof this &&\n (typeof greaterValue === 'number'\n ? value.valueOf() === greaterValue\n : true)\n );\n}\n //#endregion static public methods.\n\n //#region constructor.\n /**\n * Creates the `Greater` instance with the given primitive `value`.\n * @param value The value of generic type variable `Value` to set with a new instance.\n */\n constructor(value: Value) {\n super(value);\n }\n //#endregion constructor.\n\n //#region instance public methods.\n /**\n * Checks whether the primitive value of a specified `object` is greater than the given `value`.\n * @param value The value of `number` type to test.\n * @returns The return value is a `boolean` indicating whether the primitive value is greater than the given value.\n */\n public than(value: number): boolean {\n return typeof value === 'number' ? this.valueOf() > value : false;\n }\n\n /**\n * Checks whether the primitive value of a specified `object` is greater than every value of the given `values`.\n * @param values A rest parameter of the numbers to test.\n * @returns The return value is a `boolean` indicating whether the primitive value is greater than every value of the given `values`.\n */\n public thanEvery(...values: number[]): boolean {\n return Array.isArray(values)\n ? values.every((value) => this.valueOf() > value)\n : false;\n }\n\n /**\n * Checks whether the primitive value of a specified `object` is greater than some given `values`.\n * @param values A rest parameter of the numbers to test.\n * @returns The return value is a `boolean` indicating whether the primitive value is greater than some given `values`.\n */\n public thanSome(...values: number[]): boolean {\n return Array.isArray(values)\n ? values.some((value) => this.valueOf() > value)\n : false;\n }\n\n /**\n * Returns the primitive value of a specified `object`.\n * @returns The return value is the primitive value of generic type variable `Value`.\n */\n public override valueOf(): Value {\n return super.valueOf() as any;\n }\n //#endregion instance public methods.\n}\n","/**\n * The `Less` primitive wrapper `object` represents the primitive value of `number` type less than the given.\n */\nexport class Less<Value extends number> extends Number {\n //#region instance public accessors.\n /**\n * The `get` accessor, with the help of `toStringTag`, changes the default tag to `Less` for an instance of `Less`. It can be read\n * by the `typeOf()` function of `@angular-package/type`.\n * @returns The return value is the word 'Less` of a `string`.\n */\n public get [Symbol.toStringTag](): string {\n return 'Less';\n }\n //#endregion instance public accessors.\n\n //#region public static methods.\n /**\n * Creates the `Less` instance with the given primitive `value`.\n * @param value The value of generic type variable `Value` to set with a newly created instance.\n * @returns The return value is the `Less` instance with the primitive value of the given `value`.\n */\n public static create<Value extends number>(value: Value): Less<Value> {\n return new this(value);\n }\n\n /**\n * Checks whether the given `value` is the `Less` instance of any or given primitive value.\n * @param value The value of any type to test against the `Less` instance.\n * @param lessValue An optional value of generic type variable `Value` to check whether it's the primitive value of the given `value`.\n * @returns The return value is a `boolean` indicating whether the given `value` is the `Less` instance of any or given primitive\n * value.\n */\n public static isLess<Value extends number>(\n value: any,\n lessValue?: Value\n ): value is Less<Value> {\n return (\n typeof value === 'object' &&\n value instanceof this &&\n (typeof lessValue === 'number' ? value.valueOf() === lessValue : true)\n );\n }\n //#endregion public static methods.\n\n //#region constructor.\n /**\n * Creates the `Less` instance with the given `value`.\n * @param value The value of generic type variable `Value` to set with a new instance.\n */\n constructor(value: Value) {\n super(value);\n }\n //#endregion constructor.\n\n //#region instance public methods.\n /**\n * Checks whether the primitive value of a specified `object` is less than the given `value`.\n * @param value The value of number type to test.\n * @returns The return value is a `boolean` indicating whether the primitive value is less than the given value.\n */\n public than(value: number): boolean {\n return typeof value === 'number' ? this.valueOf() < value : false;\n }\n\n /**\n * Checks whether the primitive value of a specified `object` is less than every given value.\n * @param values A rest parameter of the numbers to test.\n * @returns The return value is a `boolean` indicating whether the primitive value is less than every value of the given `values`.\n */\n public thanEvery(...values: number[]): boolean {\n return Array.isArray(values)\n ? values.every((value) => this.valueOf() < value)\n : false;\n }\n\n /**\n * Checks whether the primitive value of a specified `object` is less than some given `values`.\n * @param values A rest parameter of the numbers to test.\n * @returns The return value is a `boolean` indicating whether the primitive value is less than some given `values`.\n */\n public thanSome(...values: number[]): boolean {\n return Array.isArray(values)\n ? values.some((value) => this.valueOf() < value)\n : false;\n }\n\n /**\n * Returns the primitive value of a specified `object`.\n * @returns The return value is the primitive value of generic type variable `Value`.\n */\n public override valueOf(): Value {\n return super.valueOf() as any;\n }\n //#endregion instance public methods.\n}\n","// Class.\nimport { Greater } from './greater.class';\nimport { Less } from './less.class';\n/**\n * The `Inequality` abstract primitive wrapper `object` represents the primitive value greater or less than the given.\n */\nexport abstract class Inequality<Value extends number> extends Number {\n //#region instance public accessors.\n /**\n * The `get` accessor obtains from the private `#greater` property an instance of the `Greater` with a primitive value from a given\n * `value` of the `Inequality` constructor.\n * @returns The return value is the `Greater` instance with a primitive value from the given `value` of the `Inequality` constructor.\n */\n public get greater(): Greater<Value> {\n return this.#greater;\n }\n\n /**\n * The `get` accessor obtains from the private `#less` property an instance of the `Less` with a primitive value from a given `value` of\n * the `Inequality` constructor.\n * @returns The return value is the `Less` instance with a primitive value from the given `value` of the `Inequality` constructor.\n */\n public get less(): Less<Value> {\n return this.#less;\n }\n //#endregion instance public accessors.\n\n //#region instance private properties.\n /**\n * Private property of the `Greater` primitive wrapper `object` indicates the value of the `number` type greater than the given.\n */\n #greater: Greater<Value>;\n\n /**\n * Private property of the `Less` primitive wrapper `object` indicates the value of `number` type less than the given.\n */\n #less: Less<Value>;\n //#endregion instance private properties.\n\n //#region constructor.\n /**\n * Creates a child class instance with the given primitive `value`.\n * @param value The value of the generic type variable `Value` is the primitive value of a new child class instance.\n */\n constructor(value: Value) {\n super(value);\n this.#greater = new Greater(value);\n this.#less = new Less(value);\n }\n //#endregion constructor.\n\n //#region instance public methods.\n /**\n * The `isBetween()` method checks whether the primitive value is between the range of a specified object.\n * @param min The minimum range of number type to test.\n * @param max The maximum range of number type to test.\n * @returns The return value is a `boolean` type indicating whether the primitive value is between the range of a specified object.\n */\n public isBetween(min: number, max: number): boolean {\n return min < max\n ? (this.greaterThan(min) && this.lessThan(max)) ||\n min === this.valueOf() ||\n max === this.valueOf()\n : false;\n }\n\n /**\n * Checks whether the primitive value is between every range of the given `ranges`.\n * @param ranges A rest parameter of `array` type ranges to test.\n * @returns The return value is a `boolean` type indicating whether the primitive value is between every range of the\n * given `ranges`.\n */\n public isBetweenEvery(...ranges: [number, number][]): boolean {\n return ranges.every((range) => this.isBetween(range[0], range[1]));\n }\n\n /**\n * Checks whether the primitive value is between some given `ranges`.\n * @param ranges A rest parameter of `array` type ranges to test.\n * @returns The return value is a `boolean` type indicating whether the primitive value is between some given `ranges`.\n */\n public isBetweenSome(...ranges: [number, number][]): boolean {\n return ranges.some((range) => this.isBetween(range[0], range[1]));\n }\n\n /**\n * Checks whether the primitive value of a child class instance is greater than the given `value`.\n * @param value The value of `number` type to test.\n * @returns The return value is a `boolean` indicating whether the primitive value of a child class instance is greater than the given\n * `value`.\n */\n public greaterThan(value: number): boolean {\n return this.#greater.than(value);\n }\n\n /**\n * Checks whether the primitive value of a child class instance is greater than every value of the given `values`.\n * @param values A rest parameter of the numbers to test.\n * @returns The return value is a `boolean` indicating whether the primitive value of a child class instance is greater than every value\n * of the given `values`.\n */\n public greaterThanEvery(...values: number[]): boolean {\n return this.#greater.thanEvery(...values);\n }\n\n /**\n * Checks whether the primitive value of a child class instance is greater than some given `values`.\n * @param values A rest parameter of the numbers to test.\n * @returns The return value is a `boolean` indicating whether the primitive value of a child class instance is greater than some given\n * `values`.\n */\n public greaterThanSome(...values: number[]): boolean {\n return this.#greater.thanSome(...values);\n }\n\n /**\n * Checks whether the primitive value of a child class instance is less than the given `value`.\n * @param value The value of `number` type to test.\n * @returns The return value is a `boolean` indicating whether the primitive value of a child class instance is **less** than the given\n * `value`.\n */\n public lessThan(value: number): boolean {\n return this.#less.than(value);\n }\n\n /**\n * Checks whether the primitive value of a child class instance is less than every given value.\n * @param values A rest parameter of the numbers to test.\n * @returns The return value is a `boolean` indicating whether the primitive value of a child class instance is less than every value of\n * the given `values`.\n */\n public lessThanEvery(...values: number[]): boolean {\n return this.#less.thanEvery(...values);\n }\n\n /**\n * Checks whether the primitive value of a child class instance is less than some given `values`.\n * @param values A rest parameter of the numbers to test.\n * @returns The return value is a `boolean` indicating whether the primitive value of a child class instance is less than some given\n * `values`.\n */\n public lessThanSome(...values: number[]): boolean {\n return this.#less.thanSome(...values);\n }\n //#endregion instance public methods.\n}\n","// Class.\nimport { Inequality } from './inequality.class';\n/**\n * The `Maximum` primitive wrapper object extended by the `Inequality` abstract primitive wrapper `object` represents the maximum number\n * greater or less than the given.\n */\nexport class Maximum<Value extends number> extends Inequality<Value> {\n //#region instance public properties.\n /**\n * The `get` accessor, with the help of `toStringTag`, changes the default tag to `'Maximum'` for an instance of `Maximum`. It can be read\n * by the `typeOf()` function of `@angular-package/type`.\n */\n public get [Symbol.toStringTag](): string {\n return 'Maximum';\n }\n //#endregion instance public properties.\n\n //#region static public methods.\n /**\n * Creates the `Maximum` instance with the given primitive `value`.\n * @param value The maximum number of generic type variable `Value` to set with a new instance.\n * @returns The return value is the `Maximum` instance of the given primitive `value`.\n */\n public static create<Value extends number>(value: Value): Maximum<Value> {\n return new this(value);\n }\n\n /**\n * Checks whether the value of any type is the `Maximum` instance of any or the given primitive value.\n * @param value The value of any type to test against the `Maximum` instance.\n * @param max Optional maximum of the generic type variable `Value` to check if it's the primitive value of the given `value`.\n * @returns The return value is a `boolean` indicating whether the provided value is an instance of `Maximum`.\n */\n public static isMaximum<Value extends number>(\n value: any,\n max?: Value\n ): value is Maximum<Value> {\n return (\n typeof value === 'object' &&\n value instanceof this &&\n (typeof max === 'number' ? value.valueOf() === max : true)\n );\n }\n //#endregion static methods.\n\n //#region constructor.\n /**\n * Creates the `Maximum` instance of the given primitive `value`.\n * @param value The value of the generic type variable `Value` is the primitive value of the new instance.\n */\n constructor(value: Value) {\n super(value);\n }\n //#endregion constructor.\n\n //#region instance public methods.\n /**\n * The `valueOf()` method returns the primitive value of the generic type variable `Value` of the specified `Maximum` object.\n * @returns The return value is the primitive value of the generic type variable `Value`.\n */\n public override valueOf(): Value {\n return super.valueOf() as Value;\n }\n //#endregion instance public methods.\n}\n","// Class.\nimport { Inequality } from './inequality.class';\n/**\n * The `Minimum` primitive wrapper object extended by the `Inequality` abstract primitive wrapper `object` represents the minimum number\n * greater or less than the given.\n */\nexport class Minimum<Value extends number> extends Inequality<Value> {\n //#region instance public properties.\n /**\n * The property, with the help of `toStringTag`, changes the default tag to `'Minimum'` for an instance of `Minimum`. It can be read by\n * the `typeOf()` function of `@angular-package/type`.\n */\n public get [Symbol.toStringTag](): string {\n return 'Minimum';\n }\n //#endregion instance public properties.\n\n //#region static public methods.\n /**\n * The static `create()` method creates the `Minimum` instance with the given primitive `value`.\n * @param value The minimum number of generic type variable `Value` to set with a new instance.\n * @returns The return value is the `Minimum` instance with the primitive value of the given `value`.\n */\n public static create<Value extends number>(value: Value): Minimum<Value> {\n return new this(value);\n }\n\n /**\n * The static `isMinimum()` method checks the provided `value` of any type whether is an instance of `Minimum` of any or the given `min`.\n * @param value The value of any type to test against the `Minimum` instance.\n * @param max Optional minimum of the generic type variable `Value` to check if it's the primitive value of the given `value`.\n * @returns The return value is a `boolean` indicating whether the provided `value` is an instance of `Minimum` of any or the given `min`.\n */\n public static isMinimum<Value extends number>(\n value: any,\n min?: Value\n ): value is Minimum<Value> {\n return (\n typeof value === 'object' &&\n value instanceof this &&\n (typeof min === 'number' ? value.valueOf() : true)\n );\n }\n //#endregion static public methods.\n\n //#region constructor.\n /**\n * Creates the `Minimum` instance of the given primitive `value`.\n * @param value The value of the generic type variable `Value` is the primitive value of the new instance.\n */\n constructor(value: Value) {\n super(value);\n }\n //#endregion constructor.\n\n //#region instance public methods.\n /**\n * The `valueOf()` method returns the primitive value of generic type variable `Value` of the specified `Minimum` object.\n * @returns The return value is the primitive value of generic type variable `Value`.\n */\n public override valueOf(): Value {\n return super.valueOf() as Value;\n }\n //#endregion instance public methods.\n}\n","// Class.\nimport { Inequality } from './inequality.class';\n/**\n * The `Number` primitive wrapper object extended by the `Inequality` abstract primitive wrapper `object` represents the number greater or\n * less than the given.\n */\nexport class Number<Value extends number> extends Inequality<Value> {\n //#region static public methods.\n /**\n * Creates the `Number` instance with the given primitive `value`.\n * @param value The number of generic type variable `Value` to set with a new instance.\n * @returns The return value is the `Number` instance of the given primitive `value`.\n */\n public static create<Value extends number>(value: Value): Number<Value> {\n return new this(value);\n }\n\n /**\n * Checks whether the value of any type is the `Number` instance of any or the given primitive value.\n * @param value The value of any type to test against the `Number` instance.\n * @param numberValue Optional number of the generic type variable `Value` to check if it's the primitive value of the given `value`.\n * @returns The return value is a `boolean` indicating whether the provided value is an instance of `Number` of any or the given\n * `numberValue`.\n */\n public static isNumber<Value extends number>(\n value: any,\n numberValue?: Value\n ): value is Number<Value> {\n return (\n typeof value === 'object' &&\n value instanceof this &&\n (typeof numberValue === 'number' ? value.valueOf() === numberValue : true)\n );\n }\n //#endregion static methods.\n\n //#region constructor.\n /**\n * Creates the `Number` instance of the given primitive `value`.\n * @param value The value of the generic type variable `Value` is the primitive value of the new instance.\n */\n constructor(value: Value) {\n super(value);\n }\n //#endregion constructor.\n\n //#region instance public methods.\n /**\n * The `valueOf()` method returns the primitive value of the generic type variable `Value` of the specified `Number` object.\n * @returns The return value is the primitive value of the generic type variable `Value`.\n */\n public override valueOf(): Value {\n return super.valueOf() as Value;\n }\n //#endregion instance public methods.\n}\n","// Class.\nimport { Maximum } from './maximum.class';\nimport { Minimum } from './minimum.class';\n/**\n * The `Range` object represents a range between a minimum and maximum.\n */\nexport class Range<\n Min extends number,\n Max extends number,\n Step extends number = 1\n> {\n //#region instance accessors.\n /**\n * The `get` accessor obtains the range of an `Array` of the minimum to the maximum with the step of a specified `Range` object.\n * @returns The return value is the range from minimum to the maximum of a read-only `Array` of number.\n */\n public get range(): Readonly<Array<number>> {\n return this.getRange();\n }\n\n /**\n * The `get` accessor obtains the step of a specified `Range` object. It's used to return the entire range, get the step of the range\n * value, and change the range value.\n * @returns The return value is the step of generic type variable `Step`.\n */\n public get step(): Step {\n return this.#step;\n }\n\n /**\n * The `get` accessor retrieves the number of steps of the specified `Range` object.\n * @returns The return value is the number of steps of the `number` type.\n */\n public get steps(): number {\n return this.getRange().length;\n }\n\n /**\n * The `get` accessor retrieves the `#value` property that indicates the range current value of the `number` type of a specified `Range`\n * object. It can be set by the `setValue()` method.\n * @returns The return value is the range current value of `number` type if set, otherwise `undefined`.\n */\n public get value(): number | undefined {\n return this.#value;\n }\n\n /**\n * The `set` accessor sets the range current value of the `number` type between the minimum and maximum of a specified `Range`\n * object.\n * @returns The return value is the range current value of `number` type if set, otherwise `undefined`.\n */\n public set value(value: number | undefined) {\n typeof value === 'number'\n ? this.has(value) && (this.#value = value)\n : undefined;\n }\n\n /**\n * The property, with the help of `toStringTag`, changes the default tag to `'Range'` for an instance of `Range`. It can be read by the\n * `typeOf()` function of `@angular-package/type`.\n * @returnsThe return value is the word 'Range` of a `string`.\n */\n public get [Symbol.toStringTag](): string {\n return 'Range';\n }\n //#endregion instance accessors.\n\n //#region instance properties.\n //#region public instance properties.\n /**\n * The `max` read-only property is the maximum range of generic type variable `Max` of a specified `Range` object.\n */\n public readonly max!: Max;\n\n /**\n * The `min` read-only property is the minimum range of generic type variable `Min` of a specified `Range` object.\n */\n public readonly min!: Min;\n //#endregion public instance properties.\n\n //#region private instance properties.\n /**\n * Private property of the `Maximum` primitive wrapper `object` with a primitive value from a given `max` of the `Range` constructor\n * indicates the maximum range.\n */\n #maximum: Maximum<Max>;\n\n /**\n * Private property of the `Minimum` primitive wrapper `object` with a primitive value from a given `min` of the `Range` constructor\n * indicates the minimum range.\n */\n #minimum: Minimum<Min>;\n\n /**\n * The private property of the generic type variable `Step` indicates the range step. It's used to return the entire range, get the\n * step of the range value, and change the range value.\n */\n #step: Step;\n\n /**\n * The private property of the `number` type indicates the range value. It can be set by the `setValue()` method and setter `value`.\n */\n #value?: number;\n //#endregion private instance properties.\n //#endregion instance properties.\n\n //#region static public methods.\n /**\n * The static `create()` method returns a new instance of `Range` with a range of the given required `min`, `max` and optional current\n * `value`, `step`.\n * @param min The **minimum** range of generic type variable `Min` to set with a new `Range` instance.\n * @param max The **maximum** range of generic type variable `Max` to set with a new `Range` instance.\n * @param value The optional value of the `number` type between the given `min` and `max` specifies the default value of a new `Range`\n * instance.\n * @param step Optional step of generic type variable `Step` to set with a new `Range` instance, by default `1`.\n * @returns The return value is the `Range` instance with a range of the given required `min`, `max` and optional current `value`, `step`.\n */\n public static create<\n Min extends number,\n Max extends number,\n Step extends number = 1\n >(min: Min, max: Max, value?: number, step?: Step): Range<Min, Max, Step> {\n return new this(min, max, value, step);\n }\n\n /**\n * Creates the `Range` instance from the given random numbers and the step.\n * @param numbers An `Array` of numbers to find a range and create a new instance.\n * @param step Optional step of generic type variable `Step` to set with a new `Range` instance, by default `1`.\n * @returns The return value is the `Range` instance created from the given required random numbers and the optional step.\n */\n public static createFrom<Step extends number = 1>(\n numbers: number[],\n step: Step = 1 as Step\n ): Range<number, number, Step> {\n return Range.create(\n Math.min.apply(0, numbers),\n Math.max.apply(0, numbers),\n step\n );\n }\n\n /**\n * The static `createMaximum()` method returns the `Maximum` instance of the given maximum `value`.\n * @param value The maximum range of a generic type variable `Value` to set with a new instance of `Maximum`.\n * @returns The return value is the `Maximum` instance with the primitive value from the given `value`.\n */\n public static createMaximum<Value extends number>(\n value: Value\n ): Maximum<Value> {\n return Maximum.create(value);\n }\n\n /**\n * The static `createMinimum()` method returns the `Minimum` instance of the given minimum `value`.\n * @param value The minimum range of a generic type variable `Value` to set with a new instance of `Minimum`.\n * @returns The return value is the `Minimum` instance with the primitive value from the given `value`.\n */\n public static createMinimum<Value extends number>(\n value: Value\n ): Minimum<Value> {\n return Minimum.create(value);\n }\n\n /**\n * The static `isRange()` method checks whether the `value` is an instance of `Range` of any or the given minimum, maximum, and step.\n * @param value The value of any type to test against the `Range` instance.\n * @param min The optional minimum range of generic type variable `Min` to check whether it's equal to a minimum of the given `value`.\n * @param max The optional maximum range of generic type variable `Max` to check whether it's equal to a maximum of the given `value`.\n * @param step Optional step of generic type variable `Step` to check whether it's equal to the step of the given `value`.\n * @returns The return value is a boolean indicating whether the provided `value` is an instance of `Range` of any or the given minimum,\n * maximum range and step.\n */\n public static isRange<\n Min extends number,\n Max extends number,\n Step extends number\n >(\n value: any,\n min?: Min,\n max?: Max,\n step?: Step\n ): value is Range<Min, Max, Step> {\n return typeof value === 'object' && value instanceof this\n ? (typeof min === 'number' ? value.min === min : true) &&\n (typeof max === 'number' ? value.max === max : true) &&\n (typeof step === 'number' ? value.step === step : true)\n : false;\n }\n //#endregion static public methods.\n\n //#region constructor.\n /**\n * Creates the `Range` instance with a range of the given required `min`, `max` and optional current `value`, `step`.\n * @param min The minimum range of generic type variable `Min` to set with a new `Range` instance.\n * @param max The maximum range of generic type variable `Max` to set with a new `Range` instance.\n * @param value The optional value of the `number` type between the given `min` and `max` specifies the default value of a new `Range`\n * instance.\n * @param step Optional step of generic type variable `Step` to set with a new `Range` instance, by default `1`. The step is used by the\n * `range` accessor, `getRange()` , `getRangeOfStep()` and `stepByStep()` methods to return the entire range and also by the\n * `valueDown()`, valueUp() methods to respectively decrement, increment range value.\n * @returns The return value is a new instance of `Range` of the given minimum and maximum.\n */\n constructor(min: Min, max: Max, value?: number, step: Step = 1 as Step) {\n this.#maximum = new Maximum(max);\n this.#minimum = new Minimum(min);\n this.#step = step;\n // Sets the range value between the given `min` and `max`.\n this.value = value;\n // Define the `min` and `max` property.\n Object.defineProperties(this, {\n min: {\n value: min,\n enumerable: true,\n writable: false,\n },\n max: {\n value: max,\n enumerable: true,\n writable: false,\n },\n });\n }\n //#endregion constructor.\n\n //#region instance public methods.\n /**\n * The `forEachStep()` method performs the specified action for each step in the maximum range of an `Array`.\n * @param forEachStep A `function` that accepts up to three arguments. It's called one time for each step in the range.\n * @returns The return value is the `Range` instance.\n */\n public forEachStep(\n forEachStep: (value: number, step: number, range: readonly number[]) => void\n ): this {\n this.range.forEach(forEachStep);\n return this;\n }\n\n /**\n * The `getCurrentRange()` method returns a range of numbers from minimum to the current value by the step of a specified `Range` object.\n * @returns The return value is a range of numbers of a read-only `Array` from minimum to the current value, if the current value is set,\n * otherwise `undefined`.\n */\n public getCurrentRange(): Readonly<Array<number>> | undefined {\n return typeof this.value === 'number'\n ? this.getRange(this.value)\n : undefined;\n }\n\n /**\n * The `getCurrentStep()` method returns the step of the range value.\n * @returns The return value is the step of `number` type, if range value is set, otherwise `undefined`.\n */\n public getCurrentStep(): number | undefined {\n return typeof this.value === 'number'\n ? Math.floor(this.value / this.#step)\n : undefined;\n }\n\n /**\n * @deprecated\n * The `getMax()` method gets the maximum range of a specified `Range` object.\n * @returns The return value is the maximum range of a generic type variable `Max`.\n */\n public getMax(): Max {\n return this.#maximum.valueOf();\n }\n\n /**\n * @deprecated\n * The `getMin()` method gets the minimum range of a specified `Range` object.\n * @returns The return value is the minimum range of a generic type variable `Min`.\n */\n public getMin(): Min {\n return this.#minimum.valueOf();\n }\n\n /**\n * The `getRange ()` method returns a range of numbers by the specified step from minimum to the given `value` of the specified` Range`\n * object.\n * @param value Optional maximum range value of `number` type of returned `array` by default it's the maximum range.\n * @returns The return value is a range of numbers of a read-only `Array` from minimum to the given `value`.\n */\n public getRange(value: number = this.max): Readonly<Array<number>> {\n const range = [];\n let current: number = this.min;\n while (current <= value) {\n current <= this.max && range.push(current), (current += this.#step);\n }\n return range;\n }\n\n /**\n * The `getRangeOfStep()` method returns a range of numbers by the specified step from the minimum to the given `step` of a specified\n * `Range` object.\n * @param step Step of `number` type is the maximum range of the returned `array`. The value must be less or equal to the number of range\n * steps.\n * @returns The return value is a range of numbers of a read-only `Array` from minimum to step of the given `step` if the given `step`\n * is within a range, otherwise an empty `Array`.\n */\n public getRangeOfStep(step: number): Readonly<Array<number>> {\n const range = [];\n if (step > 0 && step <= this.steps) {\n for (let value = 0; value < step; value++) {\n range.push(this.min + value * this.#step);\n }\n }\n return range;\n }\n\n /**\n * The `getValueOfStep()` method returns the range value of the given `step`. If the given `step` is not within range returns `undefined`.\n * @param step Step parameter of `number` type to retrieve the range value.\n * @returns The return value is the range value of the given `step` within a range otherwise `undefined`.\n */\n public getValueOfStep(step: number): number | undefined {\n return step > 0 && step <= this.steps ? this.range[step - 1] : undefined;\n }\n\n /**\n * The `has()` method checks whether the value is in the range of a specified `Range` object.\n * @param value The value of `number` type to test.\n * @returns The return value is a `boolean` indicating whether the given `value` is in the range of a specified `Range` object.\n */\n public has(value: number): boolean {\n return (\n (this.minLessThan(value) && this.maxGreaterThan(value)) ||\n value === this.min ||\n value === this.max\n );\n }\n\n /**\n * The `hasEvery()` method checks whether every value of the given `values` is in the range of a specified `Range` object.\n * @param value A rest parameter of numbers to test.\n * @returns The return value is a `boolean` indicating whether every value of the given `values` is in the range of a specified `Range`\n * object.\n */\n public hasEvery(...values: number[]): boolean {\n return values.every((value) => this.has(value));\n }\n\n /**\n * Checks whether some `values` are in the range of a specified `Range` object.\n * @param value A rest parameter of numbers to test.\n * @returns The return value is a `boolean` indicating whether some `values` are in the range of a specified `Range` object.\n */\n public hasSome(...values: number[]): boolean {\n return values.some((value) => this.has(value));\n }\n\n /**\n * The `isBetween()` method checks whether range of the given `min` and `max` is between the range of a specified `Range` object.\n * @param min The **minimum** range of `number` type to test.\n * @param max The **maximum** range of `number` type to test.\n * @returns The return value is a `boolean` type indicating whether the range of a specified `Range` object is between a range of the\n * given `min` and `max`.\n */\n public isBetween(min: number, max: number): boolean {\n return min <= max ? this.hasEvery(min, max) : false;\n }\n\n /**\n * Checks whether the range of a specified `Range` object is between every range of the given `ranges`.\n * @param ranges A rest parameter of ranges of an `array` type to test.\n * @returns The return value is a `boolean` type indicating whether the range of a specified `Range` object is between every range of the\n * given `ranges`.\n */\n public isBetweenEvery(...ranges: [number, number][]): boolean {\n return ranges.every((range) =>\n range[0] <= range[1] ? this.hasEvery(...range) : false\n );\n }\n\n /**\n * Checks whether the range of a specified `Range` object is between some given `ranges`.\n * @param ranges A rest parameter of an `array` type ranges to test.\n * @returns The return value is a `boolean` type indicating whether the range of a specified `Range` object is between some given\n * `ranges`.\n */\n public isBetweenSome(...ranges: [number, number][]): boolean {\n return ranges.some((range) =>\n range[0] <= range[1] ? this.hasEvery(...range) : false\n );\n }\n\n /**\n * The `maxGreaterThan()` method checks whether the value is less than the maximum range of a specified `Range` object.\n * @param value The value of `number` type to test.\n * @returns The return value is a `boolean` type indicating whether the given `value` is less than maximum range of a specified `Range`\n * object.\n */\n public maxGreaterThan(value: number): boolean {\n return this.#maximum.greaterThan(value);\n }\n\n /**\n * The `maxLessThan()` method checks whether the value is greater than the maximum range of a specified `Range` object.\n * @param value The value of `number` type to test.\n * @returns The return value is a `boolean` type indicating whether the given `value` is greater than maximum range of a specified `Range`\n * object.\n */\n public maxLessThan(value: number): boolean {\n return this.#maximum.lessThan(value);\n }\n\n /**\n * The `minGreaterThan()` method checks whether the value is less than a minimum range of a specified `Range` object.\n * @param value The value of `number` type to test.\n * @returns The return value is a `boolean` type indicating whether the given `value` is less than minimum range of a specified `Range`\n * object.\n */\n public minGreaterThan(value: number): boolean {\n return this.#minimum.greaterThan(value);\n }\n\n /**\n * The method `minLessThan()` checks whether the value is greater than the minimum range of a specified `Range` object.\n * @param value The value of `number` type to test.\n * @returns The return value is a `boolean` type indicating whether the given `value` is greater than minimum range of a specified `Range`\n * object.\n */\n public minLessThan(value: number): boolean {\n return this.#minimum.lessThan(value);\n }\n\n /**\n * The method `setValue()` sets the range value between the minimum and maximum of a specified `Range` object. If the given `value` is not\n * within range, it's not set.\n * @param value The value of `number` type to set.\n * @returns The return value is the `Range` instance.\n */\n public setValue(value: number): this {\n this.value = value;\n return this;\n }\n\n /**\n * The method `setValueToStep()` sets the value of the specified `Range` object to the value of the given `step`. If the given `step` is\n * not within range the value is not changed.\n * @param step Step of `number` type to retrieve the value from the range and set it as the range current `value`.\n * @returns The return value is the `Range` instance.\n */\n public setValueToStep(step: number): this {\n step > 0 && (this.value = this.getValueOfStep(step));\n return this;\n }\n\n /**\n * The `stepByStep()` method performs a callback function with the ability to decide when to move to the next step of the range.\n * @param callbackFn A function that accepts up to three arguments. The `value` is a function generator that allows deciding when to move\n * to the next step, `step` is the step, and `max` is the maximum of a specified `Range` object.\n * @returns The return value is the `Range` instance.\n */\n public stepByStep(\n callbackFn: (value: Generator<number>, step: Step, max: Max) => void\n ): this {\n const t = this;\n callbackFn(\n (function* stepByStep(current = t.min - t.step): Generator<number> {\n while (current < t.max) {\n yield (current += t.step);\n }\n })(),\n t.step,\n t.max\n );\n return this;\n }\n\n /**\n * @deprecated\n * The `toArray()` method returns a read-only array of the range in order minimum and maximum.\n * @returns The return value is a read-only array of the range in order minimum and maximum.\n */\n public toArray(): readonly [Min, Max] {\n return [this.#minimum.valueOf(), this.#maximum.valueOf()];\n }\n\n /**\n * The `valueDown()` method decrements the range value of a specified `Range` object by the range step or given `stepDecrement`.\n * @param stepIncrement The optional `stepDecrement` parameter of the `number` type decrements the range value. If no parameter is passed,\n * `stepDecrement` defaults to `1`.\n * @returns The return value is the `Range` instance.\n */\n public valueDown(stepDecrement = 1): this {\n typeof this.value === 'number' &&\n stepDecrement > 0 &&\n this.setValue(this.value - stepDecrement * this.#step);\n return this;\n }\n\n /**\n * @deprecated\n * The `valueOf()` method returns a read-only object consisting of the primitive values of `Minimum` and `Maximum` instances.\n * @returns The return value is a frozen `object` consisting of the primitive values of `Minimum` and `Maximum` instances.\n */\n public valueOf(): Readonly<{ min: Min; max: Max }> {\n return Object.freeze({\n min: this.#minimum.valueOf(),\n max: this.#maximum.valueOf(),\n });\n }\n\n /**\n * The `valueUp()` method increments the range value of a specified `Range` object by the range step or given `stepIncrement`.\n * @param stepIncrement The optional `stepIncrement` parameter of the `number` type increments the range value. If no parameter is passed,\n * `stepIncrement` defaults to `1`.\n * @returns The return value is the `Range` instance.\n */\n public valueUp(stepIncrement = 1): this {\n typeof this.value === 'number' &&\n stepIncrement > 0 &&\n this.setValue(this.value + stepIncrement * this.#step);\n return this;\n }\n //#endregion instance public methods.\n}\n","/*\n * Public API Surface of range\n */\nexport {\n // Abstract class.\n Inequality,\n // Class.\n Greater,\n Less,\n Maximum,\n Minimum,\n Number,\n Range,\n} from './lib';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA;;AAEG;AACG,MAAO,OAA8B,SAAQ,MAAM,CAAA;AACvD;;;;AAIG;AACH,IAAA,KAAY,MAAM,CAAC,WAAW,CAAC,GAAA;AAC7B,QAAA,OAAO,SAAS;;;AAIlB;;;;AAIG;IACI,OAAO,MAAM,CAAuB,KAAY,EAAA;AACrD,QAAA,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC;;AAGxB;;;;;;AAMG;AACE,IAAA,OAAO,SAAS,CACrB,KAAU,EACV,YAAoB,EAAA;AAEpB,QAAA,QACE,OAAO,KAAK,KA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