export const truncateDecimalValue = (
	value: number | string,
	decimals: number,
) => {
	// truncate upto number of decimals
	// biome-ignore format:
	const re = new RegExp(`^-?\\d+(?:.\\d{0,${decimals || -1}})?`, "g");
	return value?.toString().match(re)?.[0];
};
