@techmely/utils
Version:
Collection of helpful JavaScript / TypeScript utils
23 lines (18 loc) • 450 B
JavaScript
/*!
* @techmely/utils
* Copyright(c) 2021-2024 Techmely <techmely.creation@gmail.com>
* MIT Licensed
*/
import {
isNumber
} from "./chunk-N7YWL7WT.mjs";
// src/formatLot10Volume.ts
function formatLot10Volume(volume, precision = 0, defaultValue = "-") {
if (!isNumber(volume)) {
return defaultValue;
}
return (volume * 10)?.toLocaleString("en", { minimumFractionDigits: precision }).slice(0, -1);
}
export {
formatLot10Volume
};