Skip to content

divide ​

Divides the current number by the provided value and returns the quotient. Division by zero follows normal JavaScript behavior and returns Infinity, -Infinity, or NaN depending on the input.

Usage ​

ts
const pages = (50).divide(10);

// 5

Parameters

value: number
Divisor.

Returns

The quotient.

Type signature ​

ts
interface Number {
    divide(value: number): number;
}

All packages are released under the MIT License.