mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-20 14:56:17 -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(() => [
|
const formats = computed(() => [
|
||||||
{
|
{
|
||||||
label: 'Lowercase:',
|
label: 'Lowercase:',
|
||||||
value: noCase(input.value, baseConfig).toLocaleLowerCase(),
|
value: input.value.toLocaleLowerCase(),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Uppercase:',
|
label: 'Uppercase:',
|
||||||
value: noCase(input.value, baseConfig).toLocaleUpperCase(),
|
value: input.value.toLocaleUpperCase(),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Camelcase:',
|
label: 'Camelcase:',
|
||||||
|
@ -75,7 +75,7 @@ const formats = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Mockingcase:',
|
label: 'Mockingcase:',
|
||||||
value: noCase(input.value, baseConfig)
|
value: input.value
|
||||||
.split('')
|
.split('')
|
||||||
.map((char, index) => (index % 2 === 0 ? char.toUpperCase() : char.toLowerCase()))
|
.map((char, index) => (index % 2 === 0 ? char.toUpperCase() : char.toLowerCase()))
|
||||||
.join(''),
|
.join(''),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue