Smoren

Results 33 issues of Smoren

Generate a random percentage between 0 and 1. If optional param `repetitions` not given then iterate infinitely. ``` function *percentage(repetitions?: number): Iterable ``` [PHP implementation example](https://github.com/markrogoyski/itertools-php/blob/main/src/Random.php#L69) Needs to be implemented:...

enhancement
good first issue

Generate random rock-paper-scissors hands. Return values: "rock", "paper", "scissors". If optional param `repetitions` not given then iterate infinitely. ``` function *rockPaperScissors(repetitions?: number): Iterable ``` [PHP implementation example](https://github.com/markrogoyski/itertools-php/blob/main/src/Random.php#L91) Needs to be...

enhancement
good first issue

Generate random boolean values. If optional param `repetitions` not given then iterate infinitely. ``` function *booleans(repetitions?: number): Iterable ``` Needs to be implemented: * `random.booleans()` * `random.booleansAsync()` * `Stream.booleans()` *...

enhancement
good first issue

Generate random coin flips (0 or 1). If optional param `repetitions` not given then iterate infinitely. ``` function *coinFlip(repetitions?: number): Iterable ``` [PHP implementation example](https://github.com/markrogoyski/itertools-php/blob/main/src/Random.php#L30) Needs to be implemented: *...

enhancement
good first issue

Generate random selections from an array of values. If optional param `repetitions` not given then iterate infinitely. ``` function *choice(items: Array, repetitions?: number): Iterable ``` [PHP implementation example](https://github.com/markrogoyski/itertools-php/blob/main/src/Random.php#L9) Needs to...

enhancement
good first issue

Divide the elements of the iterable evenly into n smaller iterables, maintaining order. Ex: ([1, 2, 3, 4], 2) => [1, 2], [3, 4] ``` function *divide(data: Iterable | Iterator,...

enhancement
good first issue

Distribute the elements of the iterable evenly into n smaller iterables. Ex: ([1, 2, 3, 4], 2) => [1, 3], [2, 4] ``` function *distribute(data: Iterable | Iterator, n: number):...

enhancement
good first issue

Compares first iterable against one or more other iterables and iterates the values in array that are not present in any of the other arrays. ``` function *difference( ...iterables: Array...

enhancement
good first issue

Returns true if all elements of given collection that satisfy the predicate appear before all elements that don't. * Returns true for empty collection or for collection with single item....

enhancement
good first issue

True if iterables are permutations of each other. ``` function *arePermutations(...iterables: Array): boolean ``` [PHP implementation example](https://github.com/markrogoyski/itertools-php/blob/main/src/Summary.php#L224) Needs to be implemented: * `summary.arePermutations()` * `summary.arePermutationsAsync()` * `Stream.arePermutations()` * `AsyncStream.arePermutations()`

enhancement
good first issue