Skip to content

Implement random.percentage() #80

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Tracked by #50
Smoren opened this issue Feb 9, 2025 · 3 comments
Open
Tracked by #50

Implement random.percentage() #80

Smoren opened this issue Feb 9, 2025 · 3 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Smoren
Copy link
Owner

Smoren commented Feb 9, 2025

Generate a random percentage between 0 and 1.

If optional param repetitions not given then iterate infinitely.

function *percentage(repetitions?: number): Iterable<number>

PHP implementation example

Needs to be implemented:

  • random.percentage()
  • random.percentageAsync()
  • Stream.percentage()
  • AsyncStream.percentage()
@Smoren Smoren added enhancement New feature or request good first issue Good for newcomers labels Feb 9, 2025
@Manya7547
Copy link

Hi @Smoren, I would like to try this one. Can you assign this issue to me?

@Smoren
Copy link
Owner Author

Smoren commented Mar 9, 2025

Hi @Manya7547! Done :)

@Manya7547
Copy link

Hi @Smoren, I’ve submitted PR #83—let me know if you have any feedback or suggestions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants