https://github.com/sgrishchenko/reselect-utils
A collection of helpers and utilities for selectors
https://github.com/sgrishchenko/reselect-utils
re-reselect reselect reselect-utils selector
Last synced: 9 months ago
JSON representation
A collection of helpers and utilities for selectors
- Host: GitHub
- URL: https://github.com/sgrishchenko/reselect-utils
- Owner: sgrishchenko
- License: mit
- Created: 2019-01-05T19:49:39.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-06-20T14:58:10.000Z (over 2 years ago)
- Last Synced: 2025-03-28T19:45:09.766Z (10 months ago)
- Topics: re-reselect, reselect, reselect-utils, selector
- Language: TypeScript
- Homepage: https://sgrishchenko.github.io/reselect-utils/docz
- Size: 7.5 MB
- Stars: 16
- Watchers: 2
- Forks: 4
- Open Issues: 28
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [Reselect Utils](https://sgrishchenko.github.io/reselect-utils/docz)
[](https://travis-ci.com/sgrishchenko/reselect-utils)
[](https://coveralls.io/github/sgrishchenko/reselect-utils?branch=master)
[](https://www.npmjs.com/package/reselect-utils)
[](https://github.com/sgrishchenko/reselect-utils/blob/master/LICENSE)
## Install
Install from the NPM repository using yarn or npm:
```shell
yarn add reselect-utils
```
```shell
npm install reselect-utils
```
## Motivation
Such projects as [Reselect](https://github.com/reduxjs/reselect) and [Re-reselect](https://github.com/toomuchdesign/re-reselect) try to solve the task of memoization. But there is no standard solutions for some applied problems. This library was created to try to systematically solve the following problems:
- Work with optional objects as a source for selection.
- Binding parametric selectors to specific property values.
- Adaptation of parametric selectors to the new parameter interface (useful for creating parametric [structured selectors](https://github.com/reduxjs/reselect#createstructuredselectorinputselectors-selectorcreator--createselector)).
- Using selection results as parameters for a new selection.
- Calculating the aggregate value from a collection of selector results.
- Structuring of selection results (more proper typed version of [structured selector](https://github.com/reduxjs/reselect#createstructuredselectorinputselectors-selectorcreator--createselector) and [cached structured selector](https://github.com/toomuchdesign/re-reselect#createStructuredCachedSelector)).
- Implementation of key selectors composition (useful for [key selector creator](https://github.com/toomuchdesign/re-reselect#keyselectorcreator) usages).
## Credits
Reselect Utils is inspired by projects such as [Reselect](https://github.com/reduxjs/reselect), [Re-reselect](https://github.com/toomuchdesign/re-reselect) and [ts-optchain](https://github.com/rimeto/ts-optchain).
Also functional programming principles are used for design of this library. For example, [Chain Selector]() was inspired by Monad Pattern.