Range

Reactive async state.

Usage

<script>
    import {range} from "@sveu/shared"

    const numbers = range(0, 10, 2)
</script>
<script>
    import {range} from "@sveu/shared"

    const numbers = range(0, 10, 2)
</script>
svelte

Example

0

2

4

6

8

10

<script>
    import { range } from "@sveu/shared"
</script>

{#each range(0, 10, 2) as number}
    <p>{number}</p>
{/each}
<script>
    import { range } from "@sveu/shared"
</script>

{#each range(0, 10, 2) as number}
    <p>{number}</p>
{/each}
svelte
1
2
3
4
5
6
7
Click fold/expand code

API

Arguments

Name Description Type Required
start Starting number number Yes
stop Stop number number No
step Step number number No