UNPKG

@techmely/utils

Version:

Collection of helpful JavaScript / TypeScript utils

17 lines (14 loc) 376 B
/*! * @techmely/utils * Copyright(c) 2021-2024 Techmely <techmely.creation@gmail.com> * MIT Licensed */ "use strict"; (() => { // src/numberDigitLengthPrecision.ts function digitLengthPrecision(num) { const eSplit = num.toString().split(/[eE]/); const len = (eSplit[0].split(".")[1] || "").length - +(eSplit[1] || 0); return len > 0 ? len : 0; } })();