function kilomega(amount) {
	const exp = amount === 0 ? 0 : Math.floor(Math.log(amount) / Math.log(1024));
	const factor = Math.pow(1024, exp);

	return Object.assign(
		{
			amount: amount / factor,
		},
		units[exp]
	);
}
/**
 * Outputs an object with amount and si and iec units.
 * @param {number} amount Number of bits or bytes
 */
Outputs an object with amount and si and iec units.
@param {number} amount Number of bits or bytes
Outputs an object with amount and si and iec units . @param { number } amount Number of bits or bytes
function kilomega(amount) {
	const exp = amount === 0 ? 0 : Math.floor(Math.log(amount) / Math.log(1024));
	const factor = Math.pow(1024, exp);
	return Object.assign(
		{
			amount: amount / factor,
		},
		units[exp]
	);
}
function kilomega ( amount ) { const exp = amount === 0 ? 0 : Math . floor ( Math . log ( amount ) / Math . log ( 1024 ) ) ; const factor = Math . pow ( 1024 , exp ) ; return Object . assign ( { amount : amount / factor , } , units [ exp ] ) ; }
Outputs an object with amount and si and iec units.
Outputs an object with amount and si and iec units .