1.2.2 • Published 5 years ago

math-trunc-x v1.2.2

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

math-trunc-x

Get the integer part of a number.

module.exports(value)number

This method returns the integer part of a number by removing any fractional digits.

Kind: Exported function
Returns: number - The truncated number.

ParamTypeDefaultDescription
valuenumberThe number to be truncate.

Example

import mathTrunc from 'math-trunc-x';

mathTrunc(13.37); // 13
mathTrunc(42.84); // 42
mathTrunc(0.123); //  0
mathTrunc(-0.123); // -0
mathTrunc('-1.123'); // -1
mathTrunc(NaN); // NaN
mathTrunc('foo'); // NaN
mathTrunc(); // NaN
1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago