package
Round numbers to the nearest increment with an optional direction
npm install roundGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Round numbers to the nearest multiple with an optional direction.
$ npm install --save roundround(value, [multiple], [direction]) -> numberRequired
Type: number
The value to round.
Type: number
Default: 1
The multiple to round to.
Type: string
Values: up / down
If no direction is supplied, the number will be rounded to the nearest direction, defaulting to up if the value is equidistant from the rounded values.
round.down(value, multiple) -> numberConvenience method for rounding down.
round.up(value, multiple) -> numberConvenience method for rounding up.
Estimated unpacked size across 6 packages.
2.6 kB
Includes dependencies.