diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-20 21:08:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-20 21:08:54 +0300 |
commit | 2f852fc2ebbdbd7c28d182b35fe63025ebbe8274 (patch) | |
tree | e761438a1ba0c87885d78f944cf5e7332f9aa1a5 /app/assets/javascripts/lib | |
parent | 6b5e293c6d5c678e78f2a0933d636a33e4723061 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/lib')
-rw-r--r-- | app/assets/javascripts/lib/utils/constants.js | 1 | ||||
-rw-r--r-- | app/assets/javascripts/lib/utils/number_utils.js | 14 |
2 files changed, 1 insertions, 14 deletions
diff --git a/app/assets/javascripts/lib/utils/constants.js b/app/assets/javascripts/lib/utils/constants.js index 1a4ecc12f01..993d51370ec 100644 --- a/app/assets/javascripts/lib/utils/constants.js +++ b/app/assets/javascripts/lib/utils/constants.js @@ -1,5 +1,4 @@ export const BYTES_IN_KIB = 1024; -export const BYTES_IN_KB = 1000; export const HIDDEN_CLASS = 'hidden'; export const TRUNCATE_WIDTH_DEFAULT_WIDTH = 80; export const TRUNCATE_WIDTH_DEFAULT_FONT_SIZE = 12; diff --git a/app/assets/javascripts/lib/utils/number_utils.js b/app/assets/javascripts/lib/utils/number_utils.js index 2424d6cbf3b..bc87232f40b 100644 --- a/app/assets/javascripts/lib/utils/number_utils.js +++ b/app/assets/javascripts/lib/utils/number_utils.js @@ -1,4 +1,4 @@ -import { BYTES_IN_KIB, BYTES_IN_KB } from './constants'; +import { BYTES_IN_KIB } from './constants'; import { sprintf, __ } from '~/locale'; /** @@ -35,18 +35,6 @@ export function formatRelevantDigits(number) { } /** - * Utility function that calculates KB of the given bytes. - * Note: This method calculates KiloBytes as opposed to - * Kibibytes. For Kibibytes, bytesToKiB should be used. - * - * @param {Number} number bytes - * @return {Number} KiB - */ -export function bytesToKB(number) { - return number / BYTES_IN_KB; -} - -/** * Utility function that calculates KiB of the given bytes. * * @param {Number} number bytes |