Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/users_select/utils.js')
-rw-r--r--app/assets/javascripts/users_select/utils.js27
1 files changed, 0 insertions, 27 deletions
diff --git a/app/assets/javascripts/users_select/utils.js b/app/assets/javascripts/users_select/utils.js
deleted file mode 100644
index b46fd15fb77..00000000000
--- a/app/assets/javascripts/users_select/utils.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Get options from data attributes on passed `$select`.
- * @param {jQuery} $select
- * @param {Object} optionsMap e.g. { optionKeyName: 'dataAttributeName' }
- */
-export const getAjaxUsersSelectOptions = ($select, optionsMap) => {
- return Object.keys(optionsMap).reduce((accumulator, optionKey) => {
- const dataKey = optionsMap[optionKey];
- accumulator[optionKey] = $select.data(dataKey);
-
- return accumulator;
- }, {});
-};
-
-/**
- * Get query parameters used for users request from passed `options` parameter
- * @param {Object} options e.g. { currentUserId: 1, fooBar: 'baz' }
- * @param {Object} paramsMap e.g. { user_id: 'currentUserId', foo_bar: 'fooBar' }
- */
-export const getAjaxUsersSelectParams = (options, paramsMap) => {
- return Object.keys(paramsMap).reduce((accumulator, paramKey) => {
- const optionKey = paramsMap[paramKey];
- accumulator[paramKey] = options[optionKey] || null;
-
- return accumulator;
- }, {});
-};