/*
 * Calculate the bytes inside values like 250kB, 300MB, etc
 * Returns the multiple of 1024 raised to a power, where power=1 for kilo, 2=mega, 3=giga, and so on
 * Example: 4 megabytes is 4 multiples of 1024 raised to 2, or 4 * 1024 ^ 2
 * @param {number} power
 * @param {number} multiple
 * @returns bytes
 */
const toBytes = power => multiple => multiple * (1024 ** power);

export const kilobytes = toBytes(1);

export const megabytes = toBytes(2);

export const gigabytes = toBytes(3);

export const petabytes = toBytes(4);

export const MINIMUM_MEMORY_REQUIRED = megabytes(300);
