yarn add @davalapar/constant-units
module.exports = {
Kilobyte: 2 ** 10, // in bytes
Megabyte: 2 ** 20, // in bytes
Gigabyte: 2 ** 30, // in bytes
Second: 1000, // in ms
Minute: 60 * 1000, // in ms
Hour: 60 * 60 * 1000, // in ms
Day: 24 * 60 * 60 * 1000, // in ms
Ten: 10,
Hundred: 10 ** 2,
Thousand: 10 ** 3,
Million: 10 ** 6,
Billion: 10 ** 9,
Quadrillion: 10 **12,
Tenth: 0.1,
Hundredth: 0.1 ** 2,
Thousandth: 0.1 ** 3,
Millionth: 0.1 ** 6,
Billionth: 0.1 ** 9,
Quadrillionth: 0.1 ** 12,
};
MIT | @davalapar