Skip to content

Comments

Ready for release v2.4.0#96

Merged
Smoren merged 11 commits intomasterfrom
dev
Dec 29, 2025
Merged

Ready for release v2.4.0#96
Smoren merged 11 commits intomasterfrom
dev

Conversation

@Smoren
Copy link
Owner

@Smoren Smoren commented Dec 29, 2025

New features

  • random
    • percentage()
    • percentageAsync()
    • booleans()
    • booleansAsync()
  • Stream
    • ofPercentage()
  • AsyncStream
    • ofPercentage()

Deprecations

  • infinite
    • booleans() (use random.booleans() instead).
    • booleansAsync() (use random.booleansAsync() instead).

Manya7547 and others added 11 commits March 9, 2025 18:48
- Added synchronous percentage() function to generate random percentages (0 to 1) with optional repetition.
- Implemented asynchronous percentageAsync() function to generate random percentages asynchronously with optional repetition.
- Created AsyncStream.percentage() to wrap percentageAsync() in an async stream.
- Added Stream.percentage() to wrap percentage() in a synchronous stream.
- Included error handling for negative repetitions using InvalidArgumentError.

These changes introduce support for both synchronous and asynchronous random percentage generation with flexible iteration options.
Implement percentage functions for random number generation
@Smoren Smoren merged commit 7a59d01 into master Dec 29, 2025
11 checks passed
@coveralls
Copy link

Pull Request Test Coverage Report for Build 20574679787

Details

  • 184 of 184 (100.0%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 17515089885: 0.0%
Covered Lines: 1486
Relevant Lines: 1486

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants