Skip to content

replace in-house solutions for randomization with faker.js #52

@meszaros-lajos-gyorgy

Description

@meszaros-lajos-gyorgy

For example pickWeightedRandoms can be substituted with:

faker.helpers.weightedArrayElement([{ weight: 5, value: 'sunny' }, { weight: 4, value: 'rainy' }, { weight: 1, value: 'snowy' }]) // 'sunny', 50% of the time, 'rainy' 40% of the time, 'snowy' 10% of the time

https://fakerjs.dev/api/helpers.html

Needs to be checked if faker.js supports seedrandom or whether it has it's own solution for seeding.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions