Merge branch 'fl-remove-duplicated-code' into 'master'
Removes duplicated & non used code See merge request gitlab-org/gitlab-ce!17667
This commit is contained in:
commit
d47449e957
1 changed files with 0 additions and 14 deletions
|
@ -65,20 +65,6 @@ export function capitalizeFirstCharacter(text) {
|
||||||
return `${text[0].toUpperCase()}${text.slice(1)}`;
|
return `${text[0].toUpperCase()}${text.slice(1)}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function camelCase(str) {
|
|
||||||
return str.replace(/_+([a-z])/gi, ($1, $2) => $2.toUpperCase());
|
|
||||||
}
|
|
||||||
|
|
||||||
export function camelCaseKeys(obj = {}) {
|
|
||||||
return Object.keys(obj).reduce((acc, key) => {
|
|
||||||
const camelKey = camelCase(key);
|
|
||||||
return {
|
|
||||||
...acc,
|
|
||||||
[camelKey]: obj[key],
|
|
||||||
};
|
|
||||||
}, {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Replaces all html tags from a string with the given replacement.
|
* Replaces all html tags from a string with the given replacement.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue