Skip to content

Move randomFrom helper out of app.svelte.js #77

@silverbucket

Description

@silverbucket

`src/lib/stores/app.svelte.js:13` defines a one-line `randomFrom(arr)` helper at the top of the store. It's only used a few times, but `utils.js` is the proper home for it (it sits next to `uid`, `clone`, etc.) and one-liners proliferating at the top of stores is a smell.

Fix: move to `utils.js` and import.

(From comprehensive review, finding B8.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions