This repository has been archived on 2023-01-26. You can view files and clone it, but cannot push or open issues or pull requests.
|
export default str => {
|
|
const arr = str.split(/[_-]/);
|
|
let newStr = '';
|
|
for (let i = 1; i < arr.length; i++) {
|
|
newStr += arr[i].charAt(0).toUpperCase() + arr[i].slice(1);
|
|
}
|
|
return arr[0] + newStr;
|
|
};
|