Smoren
Smoren
True if all elements of the iterable are equal. ``` funcion *allEqual(data: Iterable | Iterator): boolean ``` Note: Consider maybe adding a strict parameter, or alternate method `allSame`. Needs to...
True if the iterable is empty. ``` function *isEmpty(data: Iterable | Iterator): boolean ``` [PHP implementation example](https://github.com/markrogoyski/itertools-php/blob/main/src/Summary.php#L343) Needs to be implemented: * `summary.isEmpty()` * `summary.isEmptyAsync()` * `Stream.isEmpty()` * `AsyncStream.isEmpty()`
True if not all the elements are true according to the predicate. ``` function *notAllMatch(data: Iterable | Iterator, predicate: (datum: T) => boolean): boolean ``` Needs to be implemented: *...
Reduces to a string joining all elements. * Optional separator to insert between items. * Optional prefix to prepend to the string. * Optional suffix to append to the string....
Reduce the iterable to a frequency distribution showing how often each different value in the data occurs. ``` function *toFrequencies(data: Iterable | Iterator): Array ``` Needs to be implemented: *...
Reduce the iterable to the value at the nth position. ``` function *toNth(data: Iterable | Iterator): T ``` Needs to be implemented: * `reduce.toNth()` * `reduce.toNthAsync()` * `Stream.toNth()` * `AsyncStream.toNth()`...
Reduce the iterable to any random value in the iterable. ``` function *toRandomValue(data: Iterable | Iterator): T ``` [PHP implementation example](https://github.com/markrogoyski/itertools-php/blob/main/src/Reduce.php#L277) Needs to be implemented: * `multi.toRandomValue()` * `multi.toRandomValueAsync()` *...
#### Unzip Reverse of zip. E.g.: ['a', 1], ['b', 2], ['c', 3] => ['a', 'b', 'c'], [1, 2, 3] ``` function *unzip(...iterables: Array): Array ``` Note: specify types. Needs to...
All combinations, with repeated elements, of size `length`. ``` function *combinationsWithReplacement(data: Iterable | Iterator, length: number) Iterable ``` Needs to be implemented: * `combinatorics.combinationsWithReplacement()` * `combinatorics.combinationsWithReplacementAsync()` * `Stream.combinationsWithReplacement()` * `AsyncStream.combinationsWithReplacement()`
Filter for elements where the regular expression matches. ``` function *filterRegEx(data: Iterable | Iterator, regex: string): Iterable ``` Needs to be implemented: * `single.filterRegEx()` * `single.filterRegExAsync()` * `Stream.filterRegEx()` * `AsyncStream.filterRegEx()`