UNPKG

@prishelets/utils

Version:

A modern utility library for strings, numbers, and general data types — fully typed, tested, and built for Node.js and TypeScript.

8 lines (7 loc) 233 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.roundTo = roundTo; function roundTo(value, decimals) { const factor = Math.pow(10, decimals); return Math.round(value * factor) / factor; }