mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-20 06:55:06 -04:00
refactor(case converter): no split on lowercase, uppercase and mocking case (#748)
This commit is contained in:
parent
7fe47b3be4
commit
ca43a25569
1 changed files with 3 additions and 3 deletions
|
@ -23,11 +23,11 @@ const input = ref('lorem ipsum dolor sit amet');
|
|||
const formats = computed(() => [
|
||||
{
|
||||
label: 'Lowercase:',
|
||||
value: noCase(input.value, baseConfig).toLocaleLowerCase(),
|
||||
value: input.value.toLocaleLowerCase(),
|
||||
},
|
||||
{
|
||||
label: 'Uppercase:',
|
||||
value: noCase(input.value, baseConfig).toLocaleUpperCase(),
|
||||
value: input.value.toLocaleUpperCase(),
|
||||
},
|
||||
{
|
||||
label: 'Camelcase:',
|
||||
|
@ -75,7 +75,7 @@ const formats = computed(() => [
|
|||
},
|
||||
{
|
||||
label: 'Mockingcase:',
|
||||
value: noCase(input.value, baseConfig)
|
||||
value: input.value
|
||||
.split('')
|
||||
.map((char, index) => (index % 2 === 0 ? char.toUpperCase() : char.toLowerCase()))
|
||||
.join(''),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue