33 * @const
44 * @type {number }
55 */
6- export const BYTES_PER_KB = 1024 ;
6+ export const bytesPerKb = 1024 ;
77
88/**
99 * Convert bytes to megabytes.
1010 * @param {number } bytes - The number of bytes.
1111 * @return {number } The equivalent number of megabytes.
1212 */
1313export function bytesToMb ( bytes ) {
14- return bytes / BYTES_PER_KB / BYTES_PER_KB ;
14+ return bytes / bytesPerKb / bytesPerKb ;
1515}
1616
1717/**
@@ -20,7 +20,7 @@ export function bytesToMb(bytes) {
2020 * @return {number } The equivalent number of gigabytes.
2121 */
2222export function bytesToGb ( bytes ) {
23- return bytes / BYTES_PER_KB / BYTES_PER_KB / BYTES_PER_KB ;
23+ return bytes / bytesPerKb / bytesPerKb / bytesPerKb ;
2424}
2525
2626/**
@@ -29,7 +29,7 @@ export function bytesToGb(bytes) {
2929 * @return {number } The equivalent number of bytes.
3030 */
3131export function mbToBytes ( mb ) {
32- return mb * BYTES_PER_KB * BYTES_PER_KB ;
32+ return mb * bytesPerKb * bytesPerKb ;
3333}
3434
3535/**
@@ -38,7 +38,7 @@ export function mbToBytes(mb) {
3838 * @return {number } The equivalent number of gigabytes.
3939 */
4040export function mbToGb ( mb ) {
41- return mb / BYTES_PER_KB ;
41+ return mb / bytesPerKb ;
4242}
4343
4444/**
@@ -47,7 +47,7 @@ export function mbToGb(mb) {
4747 * @return {number } The equivalent number of bytes.
4848 */
4949export function gbToBytes ( gb ) {
50- return gb * BYTES_PER_KB * BYTES_PER_KB * BYTES_PER_KB ;
50+ return gb * bytesPerKb * bytesPerKb * bytesPerKb ;
5151}
5252
5353/**
@@ -56,5 +56,5 @@ export function gbToBytes(gb) {
5656 * @return {number } The equivalent number of megabytes.
5757 */
5858export function gbToMb ( gb ) {
59- return gb * BYTES_PER_KB ;
59+ return gb * bytesPerKb ;
6060}
0 commit comments