-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Description
Is your feature request related to a problem? Please describe.
In svelte, if you want each value of a number to do something different, you have to have something like this:
{#if value === 1}
one
{:else if value === 2}
two
{:else if value === 3}
three
{:else}
some other number
{/if}
However, this can be tedious.
Describe the solution you'd like
I want a {#switch}
block. You would use it like this:
{#switch value}
{:case 1}
one
{:case 2}
two
{:case 3}
three
{:default}
some other number
{/switch}
How important is this feature to you?
It's not very important. It's just a more convenient syntax to do things.
mossaibyderharry
Metadata
Metadata
Assignees
Labels
No labels