@rxjs-ninja/rxjs-random
TypeScript icon, indicating that this package has built-in type declarations

2.1.3 • Public • Published

RxJS Ninja - Randomness

The RXJS Ninja Logo

rxjs-random

Website | API Documentation | Changelog

@rxjs-ninja/rxjs-random Observable for generating random emitters with both numbers and strings.

Function and Operator categories

Random Numbers

Functions to create Observable random numbers

// Randomly generate 50 `1byte` values between `-127` and `127` and filter values in the range `-64, 64`
fromRandomCrypto(0, { bytes: 1, unsigned: true }).pipe(take(50), filterInRange(-64, 64)).subscribe();
Output: `-12, 4, 64, 32, -1, 21, -43`;

Random Strings

// Generate a random UUID
fromUUIDv4().pipe(take(1)).subscribe();
// Output: `2a6d71bf-6ccd-4810-bc60-c9ffdedf8864`

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.1.3
    1
    • latest

Version History

Package Sidebar

Install

npm i @rxjs-ninja/rxjs-random

Weekly Downloads

2

Version

2.1.3

License

MIT

Unpacked Size

37 kB

Total Files

16

Last publish

Collaborators

  • tanepiper