https://github.com/iterable-iterator/reduce
:bowl_with_spoon: Iterable reducers for JavaScript
https://github.com/iterable-iterator/reduce
Last synced: 8 days ago
JSON representation
:bowl_with_spoon: Iterable reducers for JavaScript
- Host: GitHub
- URL: https://github.com/iterable-iterator/reduce
- Owner: iterable-iterator
- License: agpl-3.0
- Created: 2021-05-01T15:08:29.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-06-15T17:53:51.000Z (27 days ago)
- Last Synced: 2025-06-22T14:08:31.400Z (21 days ago)
- Language: JavaScript
- Homepage: https://iterable-iterator.github.io/reduce
- Size: 2.62 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
:bowl_with_spoon: [@iterable-iterator/reduce](https://iterable-iterator.github.io/reduce)
==Iterable reducers for JavaScript.
See [docs](https://iterable-iterator.github.io/reduce/index.html).> :warning: Depending on your environment, the code may require
> `regeneratorRuntime` to be defined, for instance by importing
> [regenerator-runtime/runtime](https://www.npmjs.com/package/regenerator-runtime).```js
import {range} from '@iterable-iterator/range';
import {reduce} from '@iterable-iterator/reduce';
import {mul, add} from '@functional-abstraction/operator';reduce( mul , range( 2 , 6 ) , 1 ) ; // 120
reduce( add , range( 2 , 6 ) , 1 ) ; // 15import {sum} from '@iterable-iterator/reduce';
sum( range( 6 ) ) ; // 15import {any, all, some} from '@iterable-iterator/reduce';
any( [ false* , true , ... ] ) ; // T
any( [ false* ] ) ; // F
all( [ true* , false , ... ] ) ; // F
all( [ true* ] ) ; // T
some( [ true , true , false , true , ... ] , 3 ) ; // T
some( [ true , false , true , false* ] , 3 ) ; // Fimport {increasing, decreasing} from "@total-order/primitive" ;
import {min, max} from '@iterable-iterator/reduce';
min( increasing , [ 2 , 1 , 3 ] ) ; // 1
max( increasing , [ 2 , 1 , 3 ] ) ; // 3
```[](https://raw.githubusercontent.com/iterable-iterator/reduce/main/LICENSE)
[](https://www.npmjs.org/package/@iterable-iterator/reduce)
[](https://github.com/iterable-iterator/reduce/actions/workflows/ci.yml?query=branch:main)
[](https://github.com/iterable-iterator/reduce/network/dependencies)
[](https://github.com/iterable-iterator/reduce/issues)
[](https://www.npmjs.org/package/@iterable-iterator/reduce)[](https://codeclimate.com/github/iterable-iterator/reduce/issues)
[](https://codeclimate.com/github/iterable-iterator/reduce/trends/churn)
[](https://codecov.io/gh/iterable-iterator/reduce)
[](https://codeclimate.com/github/iterable-iterator/reduce/trends/technical_debt)
[](https://iterable-iterator.github.io/reduce/source.html)
[](https://bundlephobia.com/result?p=@iterable-iterator/reduce)