Skip to content

Initial Release

Compare
Choose a tag to compare
@ori88c ori88c released this 04 Aug 20:23
· 5 commits to main since this release

Key Features

  • Weighted Random Sampling: Sampling items with proportional probability to their weight.
  • Efficiency: O(log(n)) time and O(1) space per sample, making this class suitable for performance-demanding applications where the set of items is large and the sampling frequency is high.
  • Comprehensive documentation: The class is thoroughly documented, enabling IDEs to provide helpful tooltips that enhance the coding experience.
  • Tests: Fully covered by unit tests.
  • No external runtime dependencies: Only development dependencies are used.
  • ES2020 Compatibility: The tsconfig target is set to ES2020, ensuring compatibility with ES2020 environments.
  • TypeScript support.